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.

1 Like

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