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 REQUEST #58

Open
lernamanto opened this issue Sep 11, 2018 · 1 comment
Open

REFRESH REQUEST #58

lernamanto opened this issue Sep 11, 2018 · 1 comment

Comments

@lernamanto
Copy link

Hi,
When interacting with OAuth Transparent token refresh is almost always desired.

As WS stands on the shoulder of Alamofire, and Alamofire v4 supports a new RequestRetrier protocol,
how can I configure WS so that when my authentication token expires I get a new one and retry the request?

Thanks!

@n13
Copy link
Contributor

n13 commented Mar 24, 2019

I have the same issue with Firebase bearer tokens, they also need to be refreshed and set as headers before each call.

Alamofire 5 will support an asynchronous version of RequestAdapter that will make a token refresh like that trivial. It also has retry but no need for that in this case.

Alamofire 4 has RequestAdapter and I'll add that to ws - that should be trivial to add. But it's not async in AF4 and so won't exactly work for the Firebase case, and I OAuth transparent token is similar.

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