Google provider does not work in standalone build

Please provide the following:

  1. SDK Version:
  2. Platforms(Android/iOS/web/all):

Has anyone got the “new” google provider in expo-auth-session to work in a standalone apk? I just get a result type of “dismiss”. It’s like something is dismissing the browser.


I am having issues with it as well but not the dismiss one. I am just getting a 400 error from Google browser. Still trying to find a solution for it.

whats the error exactly say? I have solved several and can probably help.

In my case it is:

Error 400: invalid_request

Invalid parameter value for redirect_uri: Invalid scheme: com.mydomain.myapp:/oauthredirect

still trying to understand what I have to do

if you’re using a custom scheme it has to be configured in the app.json

Isn’t that the standard expo scheme?

this is from the docs:

Your app needs to conform to the URI scheme matching your android.package (ex. com.myname.mycoolapp:/ ).

  • Standalone : Automatically added, do nothing.

true true. Maybe are you using an incorrect client type? I had to play around with setting the client IDs correctly before it would work.

1 Like

So, it seems like I had to pick a custom scheme because the package name of my app has an “_” in it and the expo scheme does not accept it as valid.

For example: “com.my_domain.myapp” makes the “app.json” validation fail on the scheme key if I specifically add it.

3 questions:

  1. do I have to make any changes in the google-services.json or in FireBase for the google sign in to work using ‘expo-auth-session/providers/google’ ?
  2. do I have to add a scheme key in case I just want it to use the android.package name?
  3. what is the best approach to take for handling GoogleSignIn on both Android and iOS?
1 Like

For your question 3 I would add “and expo client for development testing in the simulator”.
I must say using authentication in expo has not been a friendly experience at all. From shifting APIs, to things that simply do not work as advertised it has consumed probably a total of 18 hours of my valuable time and I still don’t have a solution that actually works in all scenarios (android / iOS / simulator). I could have written my own by now.


Di you solve it it? After many attemps I got the same error. The authentication seems to end well, but the app gets a “dismiss” only when compiled in a standalone app.

Nah man i wish. I have spent a ridiculous amount of time trying to get it to work. I’m going to have to go back to using the older google sign in for standalone I think. I don’t know how @evanbacon got it to work.

I ended up using import * as GoogleSignIn from 'expo-google-sign-in'; which seems to be working just fine in my case. I did not manage to get the expo-auth-session to work whatever I did.

I will give it another try these days with Expo SDK 40.

1 Like

Cool man ya I ended up using expo Google app auth
for native and then since I need to support web too I use the auth session library on the web.

As I said before my hope was to use auth session across the board but it’s not working and not worth wasting any more precious time on! I didn’t see anything in the 40 release notes that would suggest it’s been fixed but let us know if you do get it working


1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.