Skip to content

Google sign-in without firebase #36673

Closed
flutter/packages
#9267

Description

@omarbelkhodja

In most of tutorials on the web, I can see that the plugin google_sign_in doesn't require firebase. In pub page, it is mentioned that the application must be registered in the following link :
https://developers.google.com/mobile/add?platform=android

That link is now redirecting to firebase's homepage. So my question is:
Is it still possible to Sign-in without firebase ? Where should I register the app in that case ?

Activity

  1. thehitechpanky commented on Aug 10, 2019

    @thehitechpanky
  2. mhrst commented on Aug 12, 2019

    @mhrst

    For using google_sign_in with a plain Google Cloud project, here's what I'm doing:

    • From the GCP Console for your project, go to APIs & Services > Credentials (https://console.cloud.google.com/apis/credentials)
    • Click the Create Credentials button, select OAuth Client ID
    • On the next screen, select Android as the Application Type
    • Fill in Signing-certificate fingerprint
    • Fill in Package name

    It seems like creating a Firebase app takes care of this step for you (and does a bunch of other things to your GCP project as well), but it's the only thing required for basic login as far as I can tell.

  3. thehitechpanky commented on Aug 12, 2019

    @thehitechpanky

    This method does not give idtoken

  4. novembrea commented on Aug 17, 2019

    @novembrea

    It does, you need to make sure to register both SHA-1 and SHA-256 keys in project settings.

  5. BondarenkoStas commented on Sep 23, 2019

    @BondarenkoStas

    @omarbelkhodja Is the issue still relevant after comments above?

  6. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 23, 2019
  7. added
    d: stackoverflowGood question for Stack Overflow
    customer: crowdAffects or could affect many people, though not necessarily a specific customer.
    and removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 11, 2019
  8. anoop-ananthan commented on Mar 13, 2020

    @anoop-ananthan

    Yes, this is a big problem. There don't seem to be any documentation except #36673 (comment). Thanks @truthmast

  9. 21 remaining items

  10. jaybe78 commented on Oct 2, 2024

    @jaybe78

    I followed this documentation https://medium.com/codebrew/flutter-google-sign-in-without-firebase-3680713966fb
    Since I've changed classpath 'com.google.gms:google-services:4.3.15'
    I'm getting the following issue
    requires google-services.json file where that is coming from firebase

    this is quite confusing because that issue mentioned by different people is always related to firebase

  11. nevsnirG commented on Jan 14, 2025

    @nevsnirG

    Updating my instructions from a previous comment to include steps for setting up iOS

    For using google_sign_in with a plain Google Cloud project (no Firebase required), here's what I'm doing:

    Android

    * From the GCP Console for your project, go to **APIs & Services** > **Credentials** (https://console.cloud.google.com/apis/credentials)
    
    * Click the **Create Credentials** button, select **OAuth Client ID**
    
    * On the next screen, select **Android** as the Application Type
    
    * Fill in **Signing-certificate fingerprint**
      
      * For instructions on finding your signing-certificate fingerprint, https://developers.google.com/android/guides/client-auth)
    
    * Fill in **Package name**
    

    iOS

    * From the GCP Console for your project, go to **APIs & Services** > **Credentials** (https://console.cloud.google.com/apis/credentials)
    
    * Click the **Create Credentials** button, select **OAuth Client ID**
    
    * On the next screen, select **iOS** as the Application Type
    
    * Fill in **Bundle ID**
    
    * After clicking **Create** a dialog will open with a **DOWNLOAD PLIST** button -- Grab this file and rename it to `GoogleService-Info.plist`
    
    * Open Xcode and put this plist file into the `Runner` folder
    

    Sadly I still get this error:
    [_handleGoogleLogin] Google login failed: Exception: Failed to login with Google: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null)
    Exception: Failed to login with Google: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , ...

    I verified the SHA-1 hash a million times. Generated a new keystore and tried that. Package name matches in the build.gradle and AndroidManifest too. Tried making new Android credentials in the Google Console. Still nothing unfortunately.

  12. Dzivo commented on May 16, 2025

    @Dzivo
  13. github-actions commented on Jul 8, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  14. locked as resolved and limited conversation to collaborators on Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2Important issues not at the top of the work listcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.d: examplesSample code and demosd: stackoverflowGood question for Stack Overflowp: google_sign_inThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions