django-ninja icon indicating copy to clipboard operation
django-ninja copied to clipboard

After adding the blacklist successfully, the token is still authenticated successfully

Open AshuaiNe opened this issue 1 year ago • 1 comments

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

AshuaiNe avatar Aug 01 '24 09:08 AshuaiNe

reopen in https://github.com/eadwinCode/django-ninja-extra

baseplate-admin avatar Aug 01 '24 14:08 baseplate-admin