Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error access_denied: Your credentials aren't allowed #215

Open
What-XD opened this issue Apr 8, 2024 · 1 comment
Open

Error access_denied: Your credentials aren't allowed #215

What-XD opened this issue Apr 8, 2024 · 1 comment

Comments

@What-XD
Copy link

What-XD commented Apr 8, 2024

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

image

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

Application DB:
image

@bojanKuzma
Copy link

Does your account.CustomUser model by default have is_active as false, if that is the case that can happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants