Refresh token in Passport.js

前端 未结 2 681
我寻月下人不归
我寻月下人不归 2021-02-13 12:48

How do I do this in Passport.js?:

When the access token expires, you can use the refresh_token to \"refresh\" your access, and gain another access_token

2条回答
  •  春和景丽
    2021-02-13 13:26

    answer from Jared Hanson, author PassportJS:

    Refresh tokens are something handled entirely on the backend, and not connected to a user's session. For example: set up a cron job, query for tokens about to expire, make POST requests to refresh them.

    Passport doesn't get involved in this process, because its separate from authentication.

提交回复
热议问题