mobileSignIn method

  1. @override
void mobileSignIn(
  1. AuthAction action
)

Handles authentication logic on mobile platforms.

Implementation

@override
void mobileSignIn(AuthAction action) async {
  provider.signIn().then((user) {
    if (user == null) throw AuthCancelledException();
    return user.authentication;
  }).then((auth) {
    final credential = fba.GoogleAuthProvider.credential(
      accessToken: auth.accessToken,
      idToken: auth.idToken,
    );

    onCredentialReceived(credential, action);
  }).catchError((err) {
    authListener.onError(err);
  });
}