I am trying to implement login through google, it is working perfectly on expo go, however, once I build the apk and try to access, it sends me to google accounts correctly, then i select the account and is when the problem happen, instead of open the app again, it try to open expo go.
This is my function:
signInWithGoogleAsync = async () => {
try {
const result = await Google.logInAsync({
androidClientId: 'xxx',
androidStandaloneAppClientId: 'xxx',
scopes: ['profile', 'email'],
});
if (result.type === 'success') {
console.log(result.user.email);
console.log(result.user.givenName);
console.log(result.user.familyName);
} else {
console.log("Canceled");
}
} catch (e) {
console.log(e);
}
}
In my app.json:
"android": {
"package": "host.exp.Exponent",
"useNextNotificationsApi": true,
"googleServicesFile": "./google-services.json",
"config": {
"googleSignIn": {
"apiKey" : "xxx",
"certificateHash": "xxx"
}
}
}