setCustomUserClaims method

Future<void> setCustomUserClaims(
  1. String uid,
  2. Map<String, dynamic> customUserClaims
)

Sets additional developer claims on an existing user identified by the provided uid, typically used to define user roles and levels of access.

These claims should propagate to all devices where the user is already signed in (after token expiration or when token refresh is forced) and the next time the user signs in. If a reserved OIDC claim name is used (sub, iat, iss, etc), an error is thrown. They will be set on the authenticated user's ID token JWT.

customUserClaims can be null.

Returns a promise containing void.

Implementation

Future<void> setCustomUserClaims(
    String uid, Map<String, dynamic> customUserClaims) async {
  await _authRequestHandler.setCustomUserClaims(uid, customUserClaims);
}