I have already decode the token but i can't get the nested JsonObject. I want to get id in user_metadata:hasura.
{
"exp": 16636813,
"email": "123@gmail.com",
"user_metadata": {
"hasura": {
"id": "123"
}
}
I have used couple of Library, I have gotten Option<String> or Claim. But i couldn't go further than gettin only string value from "exp".
I have tried this from this library (https://github.com/auth0/JWTDecode.Android), but i got null values:
var claim : Claim = jwt.getClaim("user_metadata")
metadata = claim.asObject(UserMetadata::class.java)!!