customClaims property

Map<String, dynamic> customClaims
final

Adds additional custom claims to the user's JWT during authentication.

For example, the following code starts an OTP sign in and requests a custom claim with the authenticated user's full name:

const options = SignInOptions(customClaims: {'name': '{{user.name}}'});
await Descope.otp.signIn(method: DeliveryMethod.email, loginId: email, options: options);

Important: Any custom claims added via this method are considered insecure and will be nested under the nsec custom claim.

Implementation

final Map<String, dynamic> customClaims;