Try this:
-Login to your expo account: on command line type:
expo login
##then your account credencials##
then restart your expo instance:
expo start
And everything should work fine
Answer from paichato on Stack OverflowTry this:
-Login to your expo account: on command line type:
expo login
##then your account credencials##
then restart your expo instance:
expo start
And everything should work fine
I have the exact same issue. I've posted on the Expo forums too and tried to contact the devs about it but nobody's responding to me. I think it's been broken with a recent change. If you look at the redirect URL it's supposed to have two more query parameters one for the authentication URL and one for the return URL
Videos
» npm install expo-auth-session
Hi there! I'm working in a personal project and I want to make a log in and sign up with google, then I have been working with expo-auth-session (https://docs.expo.dev/versions/latest/sdk/auth-session/) and google cloud. The issue is that when I make log in, it never gets back to my app, everytime it redirect to google.com
I'm working in android. How can I fix this problem? did you find this issue anytime?
thanks you for advice!
Edit: My login button component is this (it's just a test, I never do it before):
WebBrowser.maybeCompleteAuthSession();
export const Login = () => {
const [request, response, promptAsync] = Google.useAuthRequest({
androidClientId: config.GOOGLE_ANDROID_CLIENT_ID,
clientId: config.GOOGLE_ANDROID_CLIENT_ID,
});
const testSending = async (token: string) => {
console.log("=========================TOKEN========================");
console.log(token);
console.log("=================================================");
};
useEffect(() => {
if (response) {
if (response.type === 'success') {
const { authentication } = response;
testSending(authentication?.idToken || '');
console.log(authentication);
}else {
console.log("=========================FAILED========================");
console.log("Login failed");
console.log("=================================================");
}
}
}, [response])
return (
<Pressable onPress={() => promptAsync().catch((error) => console.error(error))} disabled={!request} style={{ padding: 10, backgroundColor: 'blue' }}>
<Text style={{ color: 'white' }}>Login with Google</Text>
</Pressable>
)
}I had the same configuration as yours, a little bit different is in the
scheme value in app.json.
So this issue is regarding the deep linking mechanism that currently has no longer supported due to the risk of app impersonation.
To solve this what you need is enable scheme manually in your OAUTH credentials.
- Go to credentials page
- Select your current OAUTH credentials
- Open Advanced setting
- Check Enable custom URI scheme Enable scheme
For more details you can check reference here: https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_custom-scheme
could it be that you are logging in , on expo go, through a web browser as opposed to your app? and that google chrome or other trusted browsers are not installed in google play on your expo go? I tried installing google chrome first on my expo go then ran my app and it worked ok