Google.useAuthRequest() from expo-auth-session successful but with authentication as null in response

Hi,

I’m working with the expo managed workflow and was until now always using the expoClientId for the google log in and everything worked as expected, I got an access token back from the Google.useAuthRequest() response.
Now, when I switch to the androidClientId by running expo run:android the response from Google.useAuthRequest() is still successful but the authentication field is null thus the params object does not contain any access_token field. There’s a code field though, don’t know what that is for!?
My androidClientId is correct as else the response type would be dismiss instead of success.
What am I missing? Why is the response success but I don’t get any token back?

Thanks in advance!

Ive got the same problem

1 Like

Same here

I think we need to use the response from the original request.

const [_request, _loginResult, promptGoogle] = Google.useAuthRequest({
androidClientId: XXX,
iosClientId: YYY,
webClientId: ZZZ,
});

const result = await promptGoogle();

In my case, I was checking result instead of _loginResult.
For some reason, result has the token on web but contains something called code (not token) when i run on android. Super confusing.
Anyways, if we look at _loginResult (the response object from the original call), we can find the token.
Hope this helps.