Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blank Google Sign in OAuth Concent Screen in Android

My android application allows users to link their social accounts to their profile. To link gmail and youtube accounts, I am using standard google oauth method.

public void signIn(){
    doSignOut();
    //Intent signInIntent = mGoogleSignInClient.getSignInIntent();
    if(mGoogleApiClient.isConnected())
        mGoogleApiClient.clearDefaultAccountAndReconnect();
    Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);
    getActivity().startActivityForResult(signInIntent, RC_SIGN_IN);
}



protected void doSignOut() {
        mGoogleSignInClient.signOut().addOnCompleteListener(getActivity(),
                task -> {
                    Log.i(TAG, "doSignOut: Signed out Google account");
                    mGoogleSignInClient.revokeAccess().addOnCompleteListener(task1 -> {
                        Log.i(TAG, "doSignOut: revoke access successful: " + task1.isSuccessful());
                    });
                });
    }

I am signing out the connected account to always show account chooser dialog and allow linking multiple accounts

enter image description here

Selecting an account here shows the OAuth Concent screen and on allowing, the account is added. If the account was added in past, it does not even show the concent screen and adds the account directly.

Recently a problem started coming. When I try to add a new account (not linked in past), the concent screen appears as blank dialog with only progress bar.

enter image description here

I dont see any error in the logs. I recently enabled proguard in my app. However, even disabling it does not fix the issue.

Please help me fix it.

like image 428
Sudhanshu Gupta Avatar asked Aug 02 '19 19:08

Sudhanshu Gupta


People also ask

How do I remove the logo from the OAuth consent screen?

What you could do, is submit the app for verification anyway and once you get a reply from this email -> "oauth-f... @google.com" You could explain to them, the application is for internal us, no verification is needed and if they could remove the logo.


1 Answers

Go through your Google Console account, Select your Project then navigate to API & Services, Assuming you have taken (Testing) as your Publishing Status, add your test users Email Id(max 100), then save it. Then run the app, it should warn you but you can proceed to the app since its testing.

Happy Coding :)

like image 149
Amal Jogy Avatar answered Sep 23 '22 01:09

Amal Jogy