Extracts the JWT claims from the access token by first verifying the JWT against the server's JSON Web Key Set (JWKS) endpoint.
retrieveUser() as JWKS responses are cached, resulting in significantly faster responses.retrieveUser()) to verify the JWT.ClaimsResponse containing claims (a JwtPayload with typed accessors for standard JWT fields), header, and signature.JwtPayload: iss, sub, aud, exp, iat, role, aal, sessionId, email, phone, isAnonymous, amr, appMetadata, userMetadata.claims.getClaim<T>(key) or claims.getClaimOrNull<T>(key) for custom claims.An optional specific JWT to verify. If not provided, uses the current session's access token.
Options to customize the behavior, such as allowing expired tokens.
val response = supabase.auth.getClaims()
val email = response.claims.email
val role = response.claims.role
val aal = response.claims.aal
val response = supabase.auth.getClaims()
val customValue = response.claims.getClaimOrNull<String>("my_custom_claim")
val response = supabase.auth.getClaims(jwt = "your-jwt-token")