Ok, i am aware that this question has been asked multiple times, but for some reason this error keeps happening, this is the scenario:
Created PROD firebase project, inserted google-services.json within Android project (Android project path: app/google-services.json) that is working perfectly, contains:
- Two SHA1 keys - from .android/debug.keystore (for now) and custom release keystore (2 Oauth2 Android Client ID's based on those keys)
- Oauth2 Web Client ID that is used for Google Sign In - I've put them into Firebase Console/Authentication/Providers/Google Sign In/Web SDK Configuration
- Firebase Project ID is com.companyname.projectname format
Then I created DEV firebase project (app/debug/google-services.json) and i've done the following:
- Created custom debug keystore, exported SHA1 and added It into Firebase project (That keystore is used to sign debug)
- Within
build.gradle, assigned this debug keystore to debug build type and that is working - it is being signed using that keystore - Created new Oauth2 Web client id and inserted it in the same way as in PROD for Google Sign in provider
- Firebase Project ID for this project is com.companyname.projectname-dev (added application suffix within build type debug)
When I run app with debug build type, this is what happens:
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(getString(R.string.default_web_client_id))
.requestEmail()
.build();
GoogleSignInClient googleSignInClient = GoogleSignIn.getClient(this, gso);
This is good - requestIdToken is the Oauth2 Web Client ID from DEV Firebase project
BuildConfig.APPLICATION_ID returns DEV applicationId (with -dev suffix)
But then when I go to onActivityResult(), i get what i get from the title of this question - RESULT_CANCELED + 12500 result error
Has anyone had the same issue?
My apologies for rather chaotic question, i will add more info if necessary.
Note: I have tried using the .android/debug.keystore SHA1 within DEV project, but I had the same issue as the above.
