Google OAuth sign-in stuck loading consent screen

Viewed 3109

My app uses the Google Drive API to back up user files. I wanted to test my app sign-in from scratch so I manually revoked the app from my Google account settings but when I go to sign in again, I'm stuck loading the consent screen (see below) after choosing my Google account.

This is what I have...

  • Publishing status is "Testing", user type is "External", and I've added/using the right test users
  • Registered both my debug and production keys under OAuth 2.0 Client IDs
  • Scopes are only "./auth/drive.appdata" and "./auth/drive.file"
  • Domain is verified, provided organization website, support email, privacy policy link, and custom app icon

This is what I've tried...

  • Reinstalling the app and clearing data
  • Waiting about 24 hours
  • Removing the Google account from the device and signing in again
  • Deleting and reuploading my debug SHA-1 key
  • Disabling and reenabling the entire Google Drive API
  • Using a different Google account that has never been used with my app before (makes me think it's something on Google's end)
  • Using different test devices (emulator + physical devices)
  • Checking out old code branch from known-good time (in other words, sign-in code is the same)

I emphasize again that this sign-in and OAuth flow was working before (albeit showing the consent screen for "unverified" apps since it's still under development). I have not changed any scopes nor reconfigured the OAuth consent screen.

Does anyone have advice on other things to try here? Given that this was working before, I'm not sure what else I can change from my Google APIs dashboard.

I understand that my question is very similar to one asked before, however in that case apparently using a different account ended up working – that is not the case for me.

OAuth screen doesn't load consent screen

4 Answers

Mine was the same case. It used to work fine, but then after some months Google sign in Screen asked verification, and then after some days this loading stuck issue appeared. But the issue was of Goole Drive Scopes if you don't want to go for verification and your use case is simple then use recommended scopes as mentioned here https://developers.google.com/drive/api/v2/about-auth

I just wanted listing, getting and creating of files, the below scopes did the work for me

GoogleSignin.configure({
      scopes: [
        'https://www.googleapis.com/auth/drive.appdata',
        'https://www.googleapis.com/auth/drive.file',
      ],
      ...
      ...
    });

taken the create file scope from here https://developers.google.com/drive/api/v3/reference/files/create

I eventually got it working after I changed my consent screen to production mode instead of testing. The issue on Google's end (see comments) seems to have been closed with "Won't fix (inactionable)".

Update: There appears to be different causes for being stuck at the OAuth screen. In my particular case, it turned out to be a Google-side issue that I believe they later may have fixed. Other answers here may be equally helpful but I've accepted my own answer because that was specifically the conclusion to my own problem.

I had the opposite problem of most of you: my consent screen worked fine in testing mode but got the infinite loading bar in production. It turned out I was using the wrong Google Photos scope in my app code. I was only requesting https://www.googleapis.com/auth/photoslibrary.readonly in Google Cloud Console, but in my app I was using https://www.googleapis.com/auth/photoslibrary. I'm still not sure why I was allowed to use a broader scope in testing but not in production.

Had a similar situation when my app was rejected for using 'YouTube' in the description after being on the Play Store for 4 years...[but anyway]

After dinking with it for a long time and creating new credentials all kinds of stuff I went to:

google account

revoked access for the app in question

in the dev console: move the app back to testing [make sure you have testing users on your list]

uninstall the App install the app

after I picked the account, I got the same blank consent screen with a twirling progress dialog, but I also got an email; once I confirmed it was me through the email the progress bar went away and I got the oauth dialog as expected, when I clicked allow, everything worked. Back when I originally built the App before it was rejected, I don't remember the email confirmation being required, but I could be wrong. I swear I had tried this a dozen times. I wonder if Google does something on its end...

Related