5

Google SignIn was working fine in managed workflow but stopped working when ejected. react-native-unimodules is properly configured. All other configurations are exactly the same. Getting following error.

Authorization Error

Error 400: Invalid_request invalid parameter value for redirect_uri: Missing authority: null:/oauth2redirect/googleenter image description here

ClientId is checked multiple times for confirmation.

Update: I ended up using the "@react-native-google-signin/google-signin" package and it worked fine.

2 Answers 2

1

Your redirect_uri (null:/oauth2redirect/google) isn't good,

your need to follow those instructions:

  • Bundle ID: Must match the value of ios.bundleIdentifier in your app.json.
  • Your app needs to conform to the URI scheme matching your bundle identifier.
    • Bare workflow: Run npx uri-scheme add <your bundle id> --ios
  • To test this you can:
    1. Eject to bare: expo eject and run yarn ios
    2. Create a custom client: expo client:ios
    3. Build a production IPA: expo build:ios
  • Whenever you change the values in app.json you'll need to rebuild the native app.

source

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. But this does not effect anything. URI Scheme was missing. But after adding it i re ran the project but no use. I am testing on simulator.
0
+100

You should check some point below:

1.iosclientId is correct?

enter image description here

2.AccessToken should as this

const credential = firebase.auth.GoogleAuthProvider.credential(null, accessToken); firebase.auth().signInWithCredential(credential)

//Note the first parameter null

3.Add ClientID in Sign-in Method Firebase->Google->Enable->Safelist Client IDs.... -> paste ClientID into input-> Press 'Add'-> Done run yourProject

4 Comments

(1) checked and confirmed, (2) didn't even reached at this point. (3) added it but no use.
Please post code GoogleSignIn here you can not capture each error like this
okay i will update my question. I am giving you bounty as you atleast replied to my comment.
If you still have the error go ahead and add code to your questionnaire so people can continue to help you

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.