signInProvider property

String signInProvider

Returns the sign-in provider through which the ID token was obtained (anonymous, custom, phone, password, etc). Note, this does not map to provider IDs. For example, anonymous and custom authentications are not considered providers. We chose the name here to map the name used in the ID token.

Implementation

String get signInProvider {
  // Sign in provider might live inside the 'firebase' element of the JSON
  final Map<String, dynamic>? firebaseElem = claims[_firebaseKey];
  if (firebaseElem != null) {
    final String provider = firebaseElem[_signInProvider];
    return provider;
  } else {
    return claims[_signInProvider];
  }
}