JWT and one-time tokens?

前端 未结 4 1209
无人及你
无人及你 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:34

    Like others have mentioned, it depends on your business case. Password resets links can be like mentioned on https://www.jbspeakr.cc/howto-single-use-jwt/.

    If you have the Single-Use & Single-Auth scenario, where you might want to invalidate any previously used and unused token, you can store a single nonce and update it on every new token request and also when its used.

提交回复
热议问题