Update token in Passport.js

How to do it in Passport.js ?:

When the access token expires, you can use refresh_token to “refresh” your access and get another access_token. To use refresh_token you need to make a POST request for our marker endpoint using the grant_type parameter set to refresh_token:

https://podio.com/oauth/token?grant_type=refresh_token&client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&refresh_token=REFRESH_TOKEN
+5
source share
2 answers

I asked Jared if he would think about adding something to the point to make it a little easier to handle. He responded by saying that this should not be addressed at the core.

So I wrote a plugin to help: https://github.com/fiznool/passport-oauth2-refresh

+6
source

, PassportJS:

- , , . : cron, , , POST .

, .

+4

All Articles