Skip to content

How to invalidate a token? #1327

@wjw-gavin

Description

@wjw-gavin

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

How to invalidate a token based on this example?
https://github.com/nestjs/nest/tree/master/sample/19-auth-jwt

I reissue the token when requesting logout API, the expiration time of the original token remains unchanged, and I can still use the old token to request data. What should I do?

image

image

image

image

Minimum reproduction code

https://github.com/wjw-gavin/nest-study

Steps to reproduce

No response

Expected behavior

none

Package version

10

NestJS version

9

Node.js version

18

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions