expo-google-app-auth resulting in redirect_uri_mismatch error on apk

SDK Version: 34.0.0
Platforms: Android

I am trying to implement login through google with expo-google-app-auth. While it works perfectly in simulations (even emulating it on my own device), when I try creating an apk and installing it in my phone, it returns an error screen, specifying it as redirect_uri_mismatch.

Here’s the error screen:

Here’s the code I used for the login:

signInWithGoogle = async (callback) => {
      let created = new Date();

      const result = await Google.logInAsync({
        androidClientId: this.googleAuthAndroid,
        androidStandaloneAppClientId: this.googleAuthAndroid,
        scopes: ['profile', 'email'],
      });

      if (result.type === 'success') {
        let logInValues = {
          email: result.user.email,
          familyName: result.user.familyName,
          givenName: result.user.givenName,
          id: result.user.id,
          photoUrl: result.user.photoUrl,
          accessToken: result.accessToken,
          idToken: result.idToken,
          refreshToken: result.refreshToken,
        }
      }
}

Does anyone know how to fix this problem?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.