The app I'm developing uses google sign. I want to authenticate these users on my server. It used to work, but after changing the computer I develop on and in stead of running on an avd I now use a real device. After these changes google sign in stopped working and always returns Activity.RESULT_CANCELLED
So I tried to reconfigure everything in dev console with no luck. I followed the docs exactly for about 3 times now.
What I did:
went to this link: https://developers.google.com/identity/sign-in/android/start-integrating
Configured a project and entered the android debug keystore sha-1 fingerprint
Went to credentials page to get the Web client (Auto-created for Google Sign-in)
client-id
Create GoogleSignInOptions
using that client-id:
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(clientId)
.requestEmail()
.build();
I'm not using the release build variant yet btw.
What am I doing wrong here?
It appeared my applicationId
in my module level build.gradle file differed from my package name defined in my manifest file. Even though google states to use the package name in your manifest when you configure a project, you still have to make sure your build.gradle file has the same applicationId
defined for some reason.