Help needed with Google oAuth authorization
I’m struggling with Google oAuth for my app. Here’s what’s happening:
- When I use the scope
https://www.googleapis.com/auth/spreadsheets, everything works fine
- But when I try
https://www.googleapis.com/auth/spreadsheets.readonly, I get an error
The error says: “Signing in by Google in this application is temporarily disabled. We have not yet verified this app for Google Sign In.”
I’m confused why the read-only scope is causing problems. Has anyone else run into this? Any ideas on how to fix it?
It’s weird because I thought read-only would be less risky than full access. Maybe I’m missing something obvious?
// Example code (not working)
const SCOPES = ['https://www.googleapis.com/auth/spreadsheets.readonly'];
function authorize() {
return google.auth.getClient({
scopes: SCOPES
});
}
Any help would be awesome. Thanks!
This issue might be related to how your Google Cloud project is configured. Make sure you’ve properly set up the OAuth consent screen and included the read-only scope in your application’s authorized scopes. Also, double-check that you’ve enabled the Google Sheets API in your project.
If you’re still in testing, ensure your Google account is added as a test user. Sometimes, switching to a production environment or going through the verification process is necessary for certain scopes.
As a workaround, you could try using the full access scope during development and switch to read-only before deployment. Just remember to adjust your code to respect read-only operations if you do this.
Lastly, clear your browser cache and try revoking and re-granting permissions to your app. This often resolves unexpected authorization issues.
I experienced a similar problem and eventually found that the issue was not with the scope itself but with the configuration in the Google Cloud Console and OAuth consent screen settings. In my case, I needed to verify that the Sheets API was properly enabled and that the read-only scope was explicitly added during the setup. I also made sure that my testing account was correctly registered as a test user for this project. Checking these settings and clearing the browser cache seemed to resolve the sign-in error I encountered.
hey mate, i had this exact issue last week! turns out you gotta add the readonly scope to ur oauth consent screen in google cloud console. also make sure ur app is in testing mode and ur google account is listed as a tester. fixed it for me, hope it helps!