Search code examples
androidandroid-studiooauth-2.0google-oauthgoogle-calendar-api

OAuth consent screen is blank and loading icon keeps spinning forever in android app,


I have created an Android app in which I am accessing google calendar. It was working fine a week ago but now it is not showing up the OAuth consent screen, the white popup appears with the loading icon and it keeps spinning. See the screenshot

OAuth consent screen.

The error I got is

[com.google.api.client.googleapis.extensions.android.gms.auth.UserRecoverableAuthIOException: needremoteconsent]

​​After getting the exception I start the intent like this

startActivityForResult(
((UserRecoverableAuthIOException) mLastError).getIntent(),
Conn_frag_google.REQUEST_AUTHORIZATION);

but the OAuth consent screen is not showing up, the loading sign keeps spinning forever.


Solution

  • I solve this problem with Google Console. After configuring OAuth consent screen, adding "right scope" and wait while Google verify my changes the "UserRecoverableAuthIOException: NeedRemoteConsent" is gone and all start to work!

    UPDATE: it will work also with "Publishing status: Testing"