Skip to content

User Authentication Issue #1

@thisisouvik

Description

@thisisouvik

While trying to authenticate user via Google it is not Authenticating successfully.

Possible reason for this (assumption)

Google Cloud and Firebase to your app can cause authentication conflicts and failures, especially around OAuth client ID and SHA-1 configuration. This happens when multiple projects—Firebase and Google Cloud—have an OAuth 2.0 client ID configured with the same package name and SHA-1 certificate, leading to errors or failed sign-ins.

Both Firebase and Google Cloud try to generate/use OAuth 2.0 client IDs for your mobile app’s package name and SHA-1 fingerprint, but each pairing must be globally unique across all Google projects. If both cloud and Firebase contain a client ID for the same app, authentication breaks for features like Google Sign-In and Firebase Authentication.

Essential Fixes

Confirm that only one OAuth client ID (with the same SHA-1 and package name) exists across all of your Google projects. Use the Credentials page in Google Cloud Console and check other Firebase projects for possible conflicts.

If you absolutely need multiple projects, safelist the required client ID in Firebase under the Sign-In providers tab, so Firebase knows to accept external client IDs from Google Cloud.

Make sure your google-services.json or GoogleService-Info.plist matches the correct client ID, and only use the intended project’s credentials in your mobile app.

If the OAuth Consent Screen in Google Cloud is still under “Pending Verification,” some authentication flows will fail until verification completes, especially for external user sign-in.

Running flutter clean and rebuilding can sometimes fix lingering config issues after correcting the credentials.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions