New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't login using google login method #16220
Comments
the google provider defaults to not using the proxy outside of Expo Go, so you would need to set up a redirect uri for your app scheme. you can alternatively force usage of the proxy by passing in |
Is it a different uri than the one I used
I would say it might be good to add some docs about it. The other thing, Logging using google throws warnings when navigating to the redirect uri and back to my app. I use different login methods like
|
you would need to add a redirect uri like |
It works awesome. Thank you |
Hey there, How did you work it out? Did you add a different redirect uri? Thanks |
The issue was the |
Thanks for the prompt reply! I was able to cut through that obstacle. But now I am getting an authorization error saying that my request is invalid!
Do you know what might be causing this error? |
Hello there! Could you let me know what you would add for that Thanks |
i am also getting the same error too, what was that uri "yourscheme://?" and how could i fix this issue and i am also doing this from firebase |
I also faced same issue in Android Standalone app, but it works in ExpoGo. I used correct const [request, response, promptAsync] = Google.useAuthRequest({ I hope it helps. |
I have the same issue , I have used correct clientId for both expo and android . Its working fine in emulator but not working on standalone it showing 400:invalid_request 'you cant sign in to this app because it dosen't comply with google OAuth 2.0 policy for keeping app secure. |
actually The problem raising for only android Standalone App bacause when i am going signup in production mode with any gmail account its redirect to login page instead of my project and user are not created in firebase too but its prefectly works in expo app and development phase as well as IOS, only problem occurs in Android Standalone PS: Social oauth i.e facebook and google login both are not work in android Standalone app for now, I will try all over the solution on internet, documentation, etc |
Most of the time the error is caused by not giving the correct client ids. Here is how I did it
Here in the pic below you can see how you can get the Here in the pic below you can see how you can get the |
@VishalMishra0 If you got error If you got error |
Happens only in production, in expo go works fine! I'm using managed project |
Exact same case as @LucasLFurini right now. Did you figured out what is wrong. It's strange that the error is related to the redirectUri while in android mode it should not be required as it's not filtered/checked like on the web where you need to declare the acceptable sources. |
Have you tried using the makeRedirectUri function imported from expo-auth-session? const [request, response, promptAsync] = useAuthRequest( ); It worked for me, I passed the package name to the scheme. |
Try to change "expo-auth-session" version to "^4.0.3". And code: const signin = async () => { It works for me. |
Switching to "expo-auth-session": "~4.0.3" resolved my issue.
|
use "expo-auth-session": "~4.1.0" fixed my problem |
Summary
It was working well when I used
expo-google-app-auth
but it is deprecated in favor ofexpo-auth-session
. ThenI followed this step
It is working good locally but in production I get
Error 400: redirect_uri_mismatch
. Should I use different URIs (other thanhttps://auth.expo.io/@my-username/my-project-slug
) for production?Managed or bare workflow? If you have
ios/
orandroid/
directories in your project, the answer is bare!managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
44
Environment
Expo CLI 5.0.3 environment info:
System:
OS: macOS 11.4
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.5 - /usr/local/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 7.20.6 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.3
System Images: android-28 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6392135
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
npmPackages:
babel-preset-expo: 9.0.2 => 9.0.2
expo: ^44.0.0 => 44.0.6
react: 17.0.1 => 17.0.1
react-dom: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-native-web: 0.17.1 => 0.17.1
npmGlobalPackages:
eas-cli: 0.46.0
expo-cli: 5.0.3
Expo Workflow: managed
Reproducible demo
The text was updated successfully, but these errors were encountered: