3
votes

Last night a site that has been working fine for about six months started getting a 403 error when using Google OAuth. The authentication code hasn't changed, and I don't see any notes that Google OAuth suddenly changed either. I've tried re-issuing the client ID (including client secret) but that didn't fix it.

Details:

  • Full error: "Access Not Configured. Please use Google Developers Console to activate the API for your project." comes after this (scrubbed) request:

    https://accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=https%3A%2F%2Fx.y.com%2Fauth%2Fgoogle%2Fcallback&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&client_id=12345-abcdefg.apps.googleusercontent.com
    

    The response header does contain this (scrubbed):

    Location:   https://x.y.com/auth/google/callback?code=4/MF-V...
    

    which contains the code similar to what I see in the API playground.

  • Server setup: node.js running express with passport/passport-google-oauth.

I don't know what API needs to be enabled -- I sort of think this is a miss-sense error. None of the APIs in the "APIs & auth" section of the Developers Console appear to be relevant. I'm configuring OAuth under "APIs & auth > Credentials." This is not youtube or Google+ authentication.

2
I'm running into a very similar problem. I'm wondering if Google is deprecating things sooner than they documented... - James
See my answer here: stackoverflow.com/questions/22640094/… Not totally sure if its relevant to what you're doing but it might be helpful. - James
Someone please help, I am having the same issue. Please post a solution someone!! - MoB
This seems to be an intermittent issue. As I was going to activate the APIs suggested in user3461234's answer below, the API started working again. Shrug. @James your idea seems believable. - ZachB

2 Answers

1
votes

I don't think this is the cause of your problem but you should be aware of it anyway. Using OAuth 2.0 for Login (early version)

Important: Google has deprecated the early implementation of OAuth 2.0 for login that is described in this document and will no longer support it, after a migration period. If your app uses OAuth 2.0 login (early version), you should either switch to Google+ Sign-In or update your existing userinfo endpoints and scopes by the deadline given in the migration timetable. For instructions, see Migrate or update OAuth 2.0 login.

Migration timetable says on Sept. 1, 2014 its gone: https://developers.google.com/+/api/auth-migration#timetable

-1
votes

We are having the same issues. I don't know if it is luck - or what, but a few minutes ago i finally started just enabling API's to see if it would help. I enabled Google+ Domains API, Google+ Hangouts API, Admin SDK. After not being about to login all day (same error that you were getting). I have logged in twice now.