Hi,
I’m trying to configure Google Sign In. I configured both, Google Console and my edX instance. I click register, then the “Google” login button and I get to the Google Log In page.
After a succesful login on Google site, it redirects to my site and I’m getting this error:
HTTP 403 Client Error: Forbidden for url: https://www.googleapis.com/plus/v1/people/me?access_token=XXXX
After a little research, I found that my open-edX release (ironwood) is using:
social-auth-app-django==2.1.0
social-auth-core==1.7.0
The code in social-auth-core==1.7.0 is doing social_core/backends/google.py (lines 52 to 61):
class BaseGoogleOAuth2API(BaseGoogleAuth):
def user_data(self, access_token, *args, **kwargs):
"""Return user data from Google API"""
return self.get_json(
'https://www.googleapis.com/plus/v1/people/me',
params={
'access_token': access_token,
'alt': 'json'
}
)
And that API is deprecated (Legacy People API | Google for Developers)
Can I enable the Legacy People API for a new developer project?
No, the Legacy People API cannot be enabled for new developer projects. Use recommended alternatives such as Google Sign-in or Google People API.
Newer versions of those dependencies uses different a URL, and if i try the request it works fine.
Is there any workaround to configure Google Sign In?
What do you think about increasing the dependecy versions? I’m thinking in upgrading both to latest versions:
social-auth-app-django==3.1.0
social-auth-core==3.2.0
Thanks!
Juan Arias