signInWithProvider method

Future<UserCredential> signInWithProvider(
  1. AuthProvider provider
)

Signs in with an AuthProvider using native authentication flow.

A FirebaseAuthException maybe thrown with the following error code:

  • user-disabled:
  • Thrown if the user corresponding to the given email has been disabled.

Implementation

Future<UserCredential> signInWithProvider(
  AuthProvider provider,
) async {
  try {
    return UserCredential._(
      this,
      await _delegate.signInWithProvider(provider),
    );
  } on FirebaseAuthMultiFactorExceptionPlatform catch (e) {
    throw FirebaseAuthMultiFactorException._(this, e);
  } catch (e) {
    rethrow;
  }
}