getUserInfo method

String? getUserInfo()

Retrieves the user info obtained during the authorization process.

Return: -String?: an optional encoded string, which can be encoded into OpenIdClaims using jsonDecode() and OpenIdClaims.fromJson().

Note: Do not call this method before calling authorize().

Implementation

String? getUserInfo() {
  final claim = credential?.idToken.claims;
  return (claim == null) ? null : _userInfoToEncodedString(claim);
}