Open
Description
If my token has expired, and my thirdparty service uses its refresh token to generate a new token, how can i update the managers saved account info?
the flow is like this
manager.authorize('provider')
.then(res => {
// this will use the saved account info
api.auth(res.credentials.accessToken).then(apiRes => {
// the api tries to use the provided access token to auth against the provider serverside, it sees that the token is expired and uses its refreshtoken to create a new one
// apiRes returns user data including a new access token
// when this refreshtoken differs from the one manager the managers saved account info should be updated so that next time it runs it uses the correct access token
if(res.credentials.accessToken !== apiRes.accessToken) {
// Should update managers saved account info
}
})
}
Metadata
Metadata
Assignees
Labels
No labels