-
Notifications
You must be signed in to change notification settings - Fork 260
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
jwt Authentication class compatibility with drf-spectacular #387
Comments
hi, you found yourself a bug. simple oversight. the shipped auth extension does not account for that second class. easy fix |
ok I delete the duplicate issue from simple-jwt |
@tfranzel when do you think you can fix this? |
please confirm this is working and close the issue. fix will be in the next release |
yes, it works flawlessly, you are awesome thank you! |
@tfranzel Hi, can you inform me when do you want to release this bug fix?? |
@usefss i was/am pretty swamped at the moment. will do it definitely in the next couple of days. |
there is a very strange behavior of drf-spectacular when defining Authentication classes from simple-jwt when you declare JWTAuthentication as default_authentication_class swagger UI authorize button works correctly but when you declare JWTTokenUserAuthentication as default_authentication_class swagger UI authorize button disappears and can not set Bearer token.
Steps to reproduce:
first, create a Django project with rest framework and drf-spectacular and simple jwt installed and configured with documentation guidance.
now go to /api/schema/swagger-ui/ everything works fine
then change authentication classes to:
and refresh boom!! there is no authorize button at all!!! it looks like if you subclass JWTAuthentication class it goes wrong.
I did not know where to post this issue but so posted it on both, can anybody help me to fix drf-spectacular with this authentication class?
The text was updated successfully, but these errors were encountered: