Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google OAuth sign-in stuck loading consent screen

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

like image 836
Brian Avatar asked Nov 07 '22 02:11

Brian


1 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

like image 187
Mehdi Raza Avatar answered Nov 14 '22 21:11

Mehdi Raza