Google sign in from standalone app cause error 400: redirect_uri_mismatch

I follow expo docs tutorial for implementing Google sign-in in my application and it is fine in the development but after I get my build and installed on the device and tried to sign in the following happened:

error 400: redirect_uri_mismatch

here’s my code for Google sign-in :

const signInWithGoogleAsync = async () => {

    setIsLoading(true);

    try {

      const result = await Google.logInAsync({

        androidClientId: '183718259214-gjhhlagt0i24lp7f57ajv0kr1js54987.apps.googleusercontent.com',

        androidStandaloneAppClientId: '183718259214-gjhhlagt0i24lp7f57ajv0kr1js54987.apps.googleusercontent.com',

        scopes: ['profile', 'email'],

      });

  

      if (result.type === 'success') {

        onSignIn(result);

        return result.accessToken;

      } else {

        return { cancelled: true };

      }

    } catch (e) {

      return { error: true };

    }

  }

and this is the web client settings in my console:

I tried to add every link or suggestion that I saw in similar question but no luck on me.
also I tried to create another Android OAuth 2.0 Client ID because I thought I have reached the 100 request limit but same error occurred.
can anyone give me a hint that I can solve this?
I really appreciate that.

  1. SDK Version: 38
  2. Platforms(Android/iOS/web/all): Andorid

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