Search code examples
firebaseauthenticationflutterdart

Flutter - Can Google Sign in be used without firebase?


There google_sign_in package on pub.dev, bu the link it provides for setting the application up points to https://firebase.google.com/?platform=android...

Thanks!


Solution

  • Yes ! you can.

    1. Create project in cloud console.

    2. Create OAuth 2.0 clientId (by restricting it with package name)

    3. Download the JSON and place it in android->app folder, thats it.

    4. Procced the steps as in google_sign_in package without getting into firebase

       GoogleSignIn googleSignIn = GoogleSignIn(
         clientId:"xxxx.apps.googleusercontent.com");
      

    clientId is optional- but required in flutter web

    Also refer this for flutter web google sign in without firebase