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

Unable to login drf docs #836

Open
thunder-007 opened this issue Dec 24, 2024 · 1 comment
Open

Unable to login drf docs #836

thunder-007 opened this issue Dec 24, 2024 · 1 comment
Labels

Comments

@thunder-007
Copy link

Even after login the button remains login

REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'rest_framework_simplejwt.authentication.JWTAuthentication',
    ),
}

when default auth class is removed from jwtauthentication it's working.

image
@Andrew-Chen-Wang
Copy link
Member

The default auth class is required to use the DRF web view. That's because this web view uses session authentication. Instead, in development, you should have both the session and JWTAuthentication classes. In production, remove the session authentication to prevent users from logging into this web view.

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

No branches or pull requests

2 participants