Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh token handling #6

Closed
vduc opened this issue Feb 12, 2019 · 2 comments
Closed

Refresh token handling #6

vduc opened this issue Feb 12, 2019 · 2 comments

Comments

@vduc
Copy link

vduc commented Feb 12, 2019

Hi,

I have a question about access token. When a user is authenticated, a token is sent. On my server, the validity of this token is 5min. Every 5 min, a request to refresh the token is sent to the server.

Is it possible to update the token in the service?
I go through the source code but I don't see anything for it. I would like to send the new token to the service and this token will be used for all following request.

The other thing that will be useful is to retry on failed upload after an error due to an old token.

Is it possible to do something like that with your library? If yes, how?

Thanks in advance for your response

Virginie

@kukhariev
Copy link
Owner

Hi.
v 2.1.0 with

this.uploadService.control({
   action: 'refreshToken',
    token: 'newToken'
 });

and more.
I hope I will update the documentation and examples later.

@vduc
Copy link
Author

vduc commented Feb 14, 2019

Perfect,

Thanks a lot for all you work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants