-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
How frequently does the bug occur?
Always
Description
I currently using the same keystore on debug and release builds. But after I uploaded my app to Google Play Store and tried to run the app in expo run:android --variant release, it doesn't work anymore and it throws an error.
I added the new SHA-1 key from Google Play Store > App signing key certificate into OAuth 2.0 Client IDs in https://console.cloud.google.com
As I debug it, I tried to remove the SHA-1 key from the Playstore, it becomes DEVELOPER_ERROR but when I added, the error is invalid id token: 'aud" must be a string containing the client_id
The debug build is working fine
I am currently using @react-native-google-signin/google-signin
import Realm from "realm"; import { GoogleSignin } from "@react-native-google-signin/google-signin"; import { useApp } from "@realm/react"; export default function App(){ const app = useApp() function loginGoogle(){ const hasPlayServices = await GoogleSignin.hasPlayServices(); if (hasPlayServices){ const user = await GoogleSignin.signIn(); const token = user.idToken; if (token){ const googleCredentials = Realm.Credentials.google({ idToken: token }); await app.logIn(googleCredentials); } } } }
Stacktrace & log output
invalid id token: 'aud' must be a string containing the client_id
Can you reproduce the bug?
Always
Reproduction Steps
It will reproduce when I run expo run:android --variant release or installing an app using gradlew assembleRelease
Version
^12.2.1
What services are you using?
Atlas App Services: Functions or GraphQL or DataAPI etc
Are you using encryption?
No
Platform OS and version(s)
Android 13
Build environment
Which debugger for React Native: DEFAULT
Cocoapods version
No response