JWT and one-time tokens?

前端 未结 4 1239
无人及你
无人及你 2021-01-19 15:19

I\'m in the process of rolling my own JWT token auth, however, I would really like it to be a one time-token – so once it\'s used, the server generates a new token and the c

4条回答
  •  孤独总比滥情好
    2021-01-19 15:44

    Use the user's current password's hash for signing the JWT token, in this way all tokens generated before a successful password change would get invalidated the next time. I got the idea from here https://www.jbspeakr.cc/howto-single-use-jwt/.

提交回复
热议问题