-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:
How frequently does the bug occur?
All the time
Description
Google Auth
- Using the code from the docs https://docs.mongodb.com/realm/sdk/android/examples/authenticate-users/#std-label-android-login-google does not return the serverAuthCode or the idToken, although it does display the Google sign in page
- Using Android as per https://docs.mongodb.com/realm/authentication/google/#generate-oauth-client-credentials and using the clientId in requestServerAuthCode or requestIdToken returns a resultCode of CANCELLED and no sign in page is displayed
- Using a web client clientId for requestServerAuthCode and requestIdToken allows Google Sign in to complete, and returns values for both
Realm Auth
OpenID Connect ON:
- sending the authCode in Credentials with GoogleAuthType.AUTH_CODE as per the code here: https://docs.mongodb.com/realm/sdk/android/examples/authenticate-users/#google-user results in error exchanging access code with OAuth2 provider
- sending the idToken in Credentials with GoogleAuthType.ID_TOKEN results in crypto/rsa: verification error
OpenID Connect OFF:
- sending the authCode in Credentials with GoogleAuthType.AUTH_CODE as above returns error exchanging access code with OAuth2 provider
- sending the idToken in Credentials with GoogleAuthType.ID_TOKEN results in error fetching info from OAuth2 provider
I have double checked that I have the same clientId and client secret that are found on the GCP Credentials page.
I have confirmed that the sign in works as expected using a web client and Apple Id.
Stacktrace & log output
No response
Can you reproduce the bug?
Yes, always
Reproduction Steps
No response
Version
10.8.0
What SDK flavour are you using?
MongoDB Realm (i.e. Sync, auth, functions)
Are you using encryption?
No, not using encryption
Platform OS and version(s)
One Plus 6T Android 11 (Oxygen 11.1.1.1)
Build environment
Android Studio version: ... Artic Fox 2020.3.1 Patch 2
Android Build Tools version: ... 30.0.3
Gradle version: ... 1.5.31