I'm trying to implement Google authentication in django with allauth and rest-auth. After many hours of research, none of the solutions I found worked in my project.
I based my code on a github issue: https://github.com/Tivix/django-rest-auth/issues/403
And an article: https://medium.com/@gonzafirewall/google-oauth2-and-django-rest-auth-92b0d8f70575
I have also created a Social Application object with Google client id and client secret
Authorized JavaScript origins: http://localhost:8000 Authorized redirect URIs: http://localhost:8000/api/v1/users/login/google/callback/
providers.py:
from allauth.socialaccount.providers.google.provider import GoogleProvider
class GoogleProviderMod(GoogleProvider): …Run Code Online (Sandbox Code Playgroud) django-rest-framework google-oauth google-api-python-client django-allauth django-rest-auth
google-oauth ×1