Help for owners
The Sign in with Google button fails in my app
Short answer
Sign in with Google usually fails because the app's identity in Google Cloud does not match the build users install, or the redirect address is wrong. Apple adds its own rule: apps offering a social login must also offer an equivalent login service. Check which build fails, then have the keys and settings compared.
Does this sound like your situation?
- Tapping the Google button shows an error or returns to the login screen.
- It works when my developer tests but fails from the store version.
- Apple rejected my app and mentioned another login option.
- The website's Google login says redirect address not allowed.
- I changed hosting or the app name and now Google sign-in fails.
Why does this happen?
Google checks which app is asking
The Google project holds the identity of your app and its signing details. If the build users install is signed differently from the one configured, Google refuses the request.
Technical detail: Google Sign-In in Flutter fails with PlatformException sign_in_failed, code 10
The store build uses a different signing key
Google states that with Play App Signing, you sign the bundle with an upload key but users receive APKs signed with Google's app signing key, and the certificate users get differs from the one you sign with.
Confirmed by support.google.com
A website login needs an exact redirect address
Web sign-in returns the user to an address listed in the Google project. A changed domain, a missing www or http instead of https produces a redirect mismatch.
Technical detail: Google sign-in stops with Error 400: redirect_uri_mismatch
Apple requires an equivalent login option
Apple's guidelines say an app that uses a third-party or social login, such as Google Sign-In, to set up or authenticate the user's primary account must also offer an equivalent login service that limits data collection to name and email, lets users keep the email private, and does not collect app interactions for advertising without consent. Exceptions include apps that exclusively use the company's own sign-in system.
Confirmed by developer.apple.com
An accounts mismatch after sign-in
A person who first signed up by email and then taps Google with the same address can be refused or duplicated, depending on how accounts are linked.
Technical detail: next-auth asks you to sign in with a different account
What can I do about it today?
- Find out which build failsTest the version from the store, a test build and the website separately, and write down which fail.
- Find out who owns the Google projectThe login is configured in a Google Cloud project. Make sure it belongs to your business account, not only to a developer's personal one.
- Do not delete the project or its keysRemoving credentials breaks every user at once and may not be recoverable.
- Read Apple's message carefullyIf the rejection mentions login services, note the guideline number. It means another login option is required, or the app qualifies for an exception.
- List the sign-in options you wantEmail, Google, Apple, phone number. Decide what you want customers to use, so the right ones are built or removed.
- Tell users to use another method meanwhileIf email login still works, post a short message pointing users there.
When should I bring someone in?
- Google sign-in fails only in the version customers download.
- Apple has rejected the app twice for the login options.
- You cannot find out which Google or Apple account holds the settings.
How do I handle it?
- Compare what is configured with what is installedI check the app identity, signing certificates and redirect addresses against the build in the store.
- Add the missing identitiesThe store signing details and web addresses are added to the project, with the old ones kept until the new ones are confirmed.
- Review the login options against Apple's ruleI check whether the app needs an equivalent login option and add it if so.
- Test every route on real devicesStore build, test build and website are each tested on iPhone and Android before release.
- Hand the project to your companyIf the Google project is held by a developer, I help move ownership to your accounts.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
Do I have to add Sign in with Apple?
Apple's guidelines require an equivalent login service when you offer a social login, with listed exceptions such as apps that use only their own sign-in. Which applies to you depends on your app.
Why did it work before?
Something changed: the signing key, the domain, a project setting or the Apple rule applied at a new submission. The comparison finds which.
Will users lose their accounts if I change the login?
Accounts should be linked, not replaced. I plan that first, so users keep their data.
Can the Google project be moved?
Ownership and access can be changed by the current owner. I cannot do it without them.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.
For your developer: the technical fixes
PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)Google Sign-In in Flutter fails with PlatformException sign_in_failed, code 10Error 400: redirect_uri_mismatchGoogle sign-in stops with Error 400: redirect_uri_mismatch/api/auth/signin?error=OAuthAccountNotLinkednext-auth asks you to sign in with a different accountFirebase: Error (auth/api-key-not-valid.-please-pass-a-valid-api-key.)Firebase Auth says the API key is not valid