Expo Google auth fails on standalone android app
See original GitHub issueI am trying to implement google oauth with expo.it works perfectly on Expo but when i compile to apk. Once I click on google-login it opens a pop-up then i select my email after that it opens back my login screen again which is wrong.
try {
const result = await Expo.Google.logInAsync({
androidClientId: ' ',
iosClientId: ' ',
androidStandaloneAppClientId: ' ',
iosStandaloneAppClientId: ' ',
webClientId: ' ',
scopes: ['profile', 'email']
});
if (result.type === 'success') {
this.props.navigation.navigate('Home')
} else {
alert('authentication failed')
}
} catch (e) {
alert('authentication failed')
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
expo-auth-session cannot complete google login on android ...
I'm working on a react native app using expo. I've used expo-auth-session/providers/google package to sign-in.
Read more >Google provider does not work in standalone build - Expo SDK
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”....
Read more >Adding Google Auth to Expo React Native Apps for Android ...
Hi everyone!Non-deprecated approach here: https://youtu.be/hmZm_jPvWWMToday I want to show you how to add Google Auth to your Expo React ...
Read more >React Native: How to Add Firebase Google authenticaton in ...
For Android · Add the correct package.name in app. · Build an apk from your project · Create Google certificate fingerprint with expo...
Read more >OAuth 2.0 for Mobile & Desktop Apps - Google Developers
Web developers may encounter this error when an Android app opens a general web link in an embedded user-agent and a user navigates...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@codeMonk404 I think there a PR https://github.com/expo/expo/pull/4671. Hope this helps.
That was my problem. I finally got Google login working on an Android standalone app. Both webClientId and androidStandaloneAppClientId seem to be required when calling Expo.Google.logInAsync within a standalone app, otherwise the idToken won’t be included in response.