美文网首页
jwt 续期问题 2021-06-08

jwt 续期问题 2021-06-08

作者: 矩形 | 来源:发表于2021-06-08 22:29 被阅读0次

    来源

    1. When you do log in, send 2 tokens (Access token, Refresh token) in response to the client.
    2. The access token will have less expiry time and Refresh will have long expiry time.
    3. The client (Front end) will store refresh token in his local storage and access token in cookies.
    4. The client will use an access token for calling APIs. But when it expires, pick the refresh token from local storage and call auth server API to get the new token.
    5. Your auth server will have an API exposed which will accept refresh token and checks for its validity and return a new access token.
    6. Once the refresh token is expired, the User will be logged out.

    相关文章

      网友评论

          本文标题:jwt 续期问题 2021-06-08

          本文链接:https://www.haomeiwen.com/subject/ktqseltx.html