django-ninja
django-ninja copied to clipboard
After adding the blacklist successfully, the token is still authenticated successfully
settings.py NINJA_JWT = { 'BLACKLIST_AFTER_ROTATION': True,} INSTALLED_APPS = [ "ninja_jwt.token_blacklist",]
`
@http_post(
"/logout",
# response=UserLogoutSchema,
summary="user-logout",
url_name="user-logout",
auth=JWTAuth(),
)
def logout(self):
headers = self.context.request.headers
token = headers.get("Authorization").split(" ")[1]
token = RefreshToken(token).blacklist()
return {"code": 200, "message": "user logout"}
`
Checking JWTAuth found no interaction with the blacklist
reopen in https://github.com/eadwinCode/django-ninja-extra