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

Integration with Django Ninja JWT #88

Closed
robertvy opened this issue Aug 18, 2024 · 5 comments
Closed

Integration with Django Ninja JWT #88

robertvy opened this issue Aug 18, 2024 · 5 comments

Comments

@robertvy
Copy link

robertvy commented Aug 18, 2024

I'm facing an issue where Django Ninja JWT does not pass the request object during authentication. This is problematic when integrating with Django Axes, as Axes requires the request object to function correctly. As a workaround, a custom backend can bypass this requirement, but it essentially disables Axes' protection, defeating its purpose.

Could Django Ninja JWT be updated to ensure that the request object is passed during authentication?

For reference, see the related issue in Django Axes: django-axes issue #984.

@eadwinCode
Copy link
Owner

@robertvy During authentication, request object is passed. See here ->

class JWTAuth(JWTBaseAuthentication, HttpBearer):

@eadwinCode
Copy link
Owner

@robertvy I will look into this more deeply to understand what the problem is

@eadwinCode
Copy link
Owner

This should be resolved in next release.

eadwinCode added a commit that referenced this issue Aug 21, 2024
* fixed authentication with request #88

* revert commented code
@robertvy
Copy link
Author

This should be resolved in next release.

@eadwinCode I've just tested the new release in my codebase and things seem to be working with Django Axes now. Thanks for looking into this so quickly !!

@eadwinCode
Copy link
Owner

Awesome 😎

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