I published an app with package name com.xxxx.myuserid.appname. This app uses google sign in and access token id to send it to my server.
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(getString(R.string.default_web_client_id))
.requestEmail()
.build();
It works all fine as I have created a firebase app and configure its SHA1.
Then I realized that the app package has myuserid that I wanted to change. Thus, I renamed my package to com.xxxx.modified.appname. Added this package to same firebase app and configured its SHA1(new) and generated signed apk then tested it by installing using adb install. It works all fine. Then I published the same apk as new app.
Now, If I install the app from play store in any android phone, I get
W/Auth: [GetToken] GetToken failed with status code: UNREGISTERED_ON_API_CONSOLE
E/TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE
I then went to app publish dashboard and downloaded Original and Derived apk. I manually installed these apps(using adb install) and I find these working without any problem.
I tried other options to create a new firebase project and again I observe same issue i.e. app installed from play store won't work but if I download it manually from publish dashboard, it works.
I am completely out of options to fix this issue for my app. Can someone please suggest a solution to this issue?