react-native-google-signin / google-signin

Google Sign-in for your React Native applications
https://react-native-google-signin.github.io/
MIT License
3.19k stars 878 forks source link

No user consent screen on Android Production build #1156

Closed vborbely closed 1 year ago

vborbely commented 1 year ago

Steps to Reproduce

When I run my code in the DevClient, I can login with the provided Google Sign-In configuration. But when the same code runs after a Production build, there is no user consent visible.

GoogleSignin.configure({
            scopes: googleConfigObject.scopes,
            webClientId: googleConfigObject.webClientId,
            offlineAccess: true, // if you want to access Google API on behalf of the user FROM YOUR SERVER
            forceCodeForRefreshToken: false, // [Android] related to `serverAuthCode`, read the docs link below *.
            googleServicePlistPath: development ? 'GoogleService-Info-Staging' : 'GoogleService-Info', // [iOS] if you renamed your GoogleService-Info file, new name here, e.g. GoogleService-Info-Staging
            profileImageSize: 350, // [iOS] The desired height (and width) of the profile image. Defaults to 120px
        });

const googleResponse = await GoogleSignin.signIn();

After this call, seems there is no serverAuthCode value provided in the response value.

Expected Behavior

The user consent screen pops up to able the authorize the user profile data.

Actual Behavior

No user consent pops up in the Android Production build.

Environment

github-actions[bot] commented 1 year ago

:wave: @vborbely, sorry you're having an issue. As the issue template explains, we require that you provide a runnable example that reproduces your issue (please read the issue template). The reason is that maintainers do not have time to try reproduce bugs themselves. Please try to minimize the superfluous code and focus only on reproducing the bug. Please create a new issue with this and we'll be happy to review it! If you're hitting a hard wall, you may consider paid assistance.

vonovak commented 1 year ago

Hello and thanks for reporting, It's hard to tell what is going on without code that can be executed. Given that it all works in dev, I believe there's something wrong with your app's configuration. Thank you 🙂