Error access_denied: Your credentials aren't allowed
Opened this issue · 1 comments
What-XD commented
Describe the bug
When trying to get a JWT token via "convert-token" the response is an error "Your credentials aren't allowed"
To Reproduce
Send a request to receive a token on convert-token
Screenshots
Project
settings.py:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# REST
'rest_framework',
# AUTH
'oauth2_provider',
'social_django',
'drf_social_oauth2',
]
# AUTH
AUTH_USER_MODEL = 'account.CustomUser'
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'oauth2_provider.contrib.rest_framework.OAuth2Authentication',
'drf_social_oauth2.authentication.SocialAuthentication',
),
}
AUTHENTICATION_BACKENDS = (
'social_core.backends.discord.DiscordOAuth2',
'drf_social_oauth2.backends.DjangoOAuth2',
'django.contrib.auth.backends.ModelBackend',
)
SOCIAL_AUTH_DISCORD_KEY = '***'
SOCIAL_AUTH_DISCORD_SECRET = '***'
SOCIAL_AUTH_DISCORD_SCOPE = ["identify", "email"]
ACTIVATE_JWT = True
bojanKuzma commented
Does your account.CustomUser model by default have is_active as false, if that is the case that can happen.