-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hi there,
Firstly, many thanks for this library, it looks very useful 🙂
In a client application of this library, I can imagine two ways of knowing when to request a new token:
- wait for a
401
response, request new token, re-run original request. - maintain token expiry time in the local state, and when that time is past, request new token.
With the API that I am using, on refreshing a token, the SSO response includes an expiry time as well as a new token. So I would like to use method 2 (and I suspect many API maintainers would prefer 2 was used as well 😁), but I can't see a way of accessing the result of the SSO response to get at this new expiry time.
Additionally, the SSO API may return a new refresh token as part of a policy of enforcing rotation of refresh tokens, so I need to get at that data as well. In any case, I think having the choice would be nice.
Perhaps I am over looking something! But any thoughts much appreciated, thanks.