Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-2742

Error: "invalid id token: 'aud" must be a string containing the client_id" in Android Release Build after Publishing to Google Play Store

      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

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      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

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: