Note: This plugin is not actively maintained as I am not working with Flutter anymore. Feel free to submit PRs and I will do my best to work on publishing them or reach out if you wish to be a maintainer.


A Flutter plugin that makes it easy to perform OAuth sign in flows using FirebaseAuth. It also includes support for Sign in by Apple for Firebase. This plugin supports Android, iOS and Web. OAuth flows are performed by opening pop-up on top of the application to allow the user to authenticate or the native flow in the case of sign in by apple.


You need to set up Firebase for your project first before using this plugin. Instructions can be found here.

  • In your pubspec.yaml add
    sdk: flutter
  firebase_auth: ^3.0.1
  firebase_core: ^1.4.0
  firebase_auth_oauth: ^1.0.3
  • Then in your project just call

FirebaseUser user = await FirebaseAuthOAuth().openSignInFlow("A provider ID", [list of scopes], {custom parameters map});

// Sign-in by Apple example
User user = await FirebaseAuthOAuth()
          .openSignInFlow("", ["email"], {"locale": "en"});

// Or you can link an existing logged-in user
User user = await FirebaseAuthOAuth()
          .linkExistingUserWithCredentials("", ["email"], {"locale": "en"});

// Or if the OAuth credential result is needed, you can fetch provider auth result with one of the following
OAuthCredential credential = await FirebaseAuthOAuth().signInOAuth("", ["email"], {"locale": "en"});
OAuthCredential credential = await FirebaseAuthOAuth().linkWithOAuth("", ["email"], {"locale": "en"});
USer user = FirebaseAuth.instance.currentUser;

Checkout the example Widget.

Auth Providers Support

Apple✅ (Android, Web & iOS 13)

This plugin supports OAuth operations using OAuthProvider only with the exception to Sign in by Apple on iOS 13 where it uses the native AuthenticationService.

Error Handling

Below are the error codes you might receive when using this plugin

FirebaseAuthErrorAn error coming from FirebaseAuth SDK
PluginErrorAn error coming from this plugin. e.g. Invalid arguments or null items
PlatformErrorAn error coming from the native platform