getUser()
API.The JWT to verify. If not provided, uses the access token from the current session.
Options for JWT verification. Can specify `allowExpired` to skip expiration check and `jwks` to provide custom JSON Web Key Set.
let response = try await supabase.auth.getClaims()
print("User ID: \(response.claims.sub ?? "N/A")")
print("Email: \(response.claims.email ?? "N/A")")
print("Role: \(response.claims.role ?? "N/A")")
let customToken = "eyJhbGci..."
let response = try await supabase.auth.getClaims(jwt: customToken)
let response = try await supabase.auth.getClaims(
options: GetClaimsOptions(allowExpired: true)
)
let customJWKS = JWKS(keys: [...])
let response = try await supabase.auth.getClaims(
options: GetClaimsOptions(jwks: customJWKS)
)