- Notifications
You must be signed in to change notification settings - Fork211
Add a reauthenticate method to expose refresh token use#167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
monolithed commentedDec 23, 2017
@tqc, what about |
tqc commentedDec 23, 2017
@monolithed An expiry time isn’t needed - if the token you have doesn’t work, try getting a new one. You could check the expiry beforehand if you really wanted to, but it wouldn’t be particularly reliable anyway - there are plenty of other reasons for a token to expire. |
sb8244 commentedFeb 7, 2019
Something like this would be really helpful for me, since I'm having a hard time getting makeRequest to work, but JS |
This update improves the handling of refresh tokens when using a javascript api rather than the native makeRequest. Somewhat related to#82.
JS code can call reauthenticate to get a new token when a request fails due to an expired token.
I also added saving of the new token after a refresh - previously the new token would be in memory for subsequent makeRequest calls, but the next app startup would return the expired token.
iOS only for now - the android implementation is fairly straightforward, but isn't included as I'm not set up to test that at the moment.