@amanhimself
Not sure if this is enough but here is all my code for this:
package.json:
“expo-application”: “~5.1.1”,
“expo-auth-session”: “~4.0.3”,
“expo-crypto”: “~12.2.1”,
“expo-web-browser”: “~12.1.1”
app.json:
“scheme”: [“com.divego”, “fbXXXXXXX”]
sign in page:
import * as WebBrowser from “expo-web-browser”;
import * as Google from “expo-auth-session/providers/google”;
WebBrowser.maybeCompleteAuthSession();
const googleExpoClientId = config.EXPO_CLIENT_ID;
const googleAndroidClientId = config.ANDROID_CLIENT_ID;
const googleIOSClientId = config.IOS_CLIENT_ID;
const facebookAppId = config.FACEBOOK_APP_ID;
export default function SignInRoute() {
const [req, res, promptAsync] = Google.useAuthRequest({
androidClientId: googleAndroidClientId,
iosClientId: googleIOSClientId,
expoClientId: googleExpoClientId,
});
useEffect(() => {
handleGoogleSignIn();
}, [res]);
async function handleGoogleSignIn() {
alert(“response?” + res.type)
if (res?.type === “success”) {
await getGoogleUserData(res.authentication.accessToken);
}
}
<TouchableWithoutFeedback
onPress={() => {promptAsync();
}}
disabled={!req}
>
<View style={[styles.SignUpWithButtons]}>
<Image source={googleLogo} style={[styles.gLogo]} />
<Text
style={{
color: "#FFFFFF",
fontFamily: "PermanentMarker_400Regular",
fontSize: 12,
opacity: 0.7,
}}
>
Sign In With Google
</Text>
</View>
</TouchableWithoutFeedback>
}
the alert always comes back with “response?dismiss”
again on IOS it works without any issue, but on Android standalone I’m always getting this result