ID tokens
The ID token is a JSON Web Token (JWT) that contains user profile information (like the user's name, email, and so forth), represented in the form of claims. These claims are statements about the user, which can be trusted if the consumer of the token can verify its signature.
An ID token is part of the OpenID Connect specification and is issued as a result of a valid authorization request with an OpenID scope. You can find more information about ID Tokens here.
To be able to obtain a token, there are few prerequisites:
- The user must be registered with the openid scope.
- The user must be authenticated.
If the prerequisites are not met, the method returns the error ID_TOKEN_NOT_AVAILABLE
.
To get the ID token from the Flutter SDK, call the getIdToken
method.