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

Login users in to Django admin console when USE_JWT is set to true #360

Open
HybridAU opened this issue Feb 24, 2025 · 1 comment · Fixed by #361
Open

Login users in to Django admin console when USE_JWT is set to true #360

HybridAU opened this issue Feb 24, 2025 · 1 comment · Fixed by #361
Assignees
Labels
enhancement New feature or request

Comments

@HybridAU
Copy link
Contributor

We have a single page app with USE_JWT set, and we want users who have authenticated to also be able to access the Django admin console.

In the original version of this library the login function was called first then use_jwt was checked. So a user would get a 302 redirect to the single page app, but would also have cookies set so they could access the Django admin console.

Image

This library checks use_jwt first and redirects the user without setting any cookies.

I'd be happy to do a PR to change this, it would essentially be moving the login section to be above the use_jwt section.

I wanted to check if that's something that would be accepted? or if it was a specific decision that when USE_JWT is set, users are not logged in to the Django console? I did search to see if it had been raised before and found that #271 is pretty similar (not exactly the same, but this might have done what they wanted).

@mostafa
Copy link
Member

mostafa commented Feb 26, 2025

Hey @HybridAU,

I'll close this after releasing a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants