Skip to content

AssertionError at /api/google/login/: No exception message supplied #629

Open
@kdocai

Description

@kdocai

I have crated a rest API to sign up and login user via Google , If I provide my token access_type and pass the token, the new user is signed up , but I am not able to hit the same api again and get a new JWT token

image

My setting.py is :

AUTHENTICATION_BACKENDS = (
   "django.contrib.auth.backends.ModelBackend",
   "allauth.account.auth_backends.AuthenticationBackend"
)
SOCIALACCOUNT_PROVIDERS = {
    'google': {
        'APP': {
            'client_id': '<client_id>',
            'secret': '<secret_key>',
            'key': ''
        },
        'SCOPE': [
            'profile',
            'email',
        ],
        "AUTH_PARAMS": {
            "access_type": "offline",
        }
    }
}

AUTH_USER_MODEL = 'users.User'
ACCOUNT_USER_MODEL_USERNAME_FIELD = None

REST_AUTH = {
    'USE_JWT' : True,
    'JWT_AUTH_HTTPONLY':False
}

My views.py is:

from dj_rest_auth.registration.views import SocialLoginView

class GoogleLoginView(SocialLoginView):
    adapter_class = GoogleOAuth2Adapter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions