Monday, 1 July 2019

Parallel refresh requests of OAuth2 access token with Swift p2/OAuth2

I am using https://github.com/p2/OAuth2 for connecting to the backend of my app via OAuth2 which works quite well.

The problem I have is when the access token expires and multiple requests happen at the same time some of them fail.

Parallel requests can be triggered from different parts of the app. For example when the app is launched the current location is sent to the server and a list of events is downloaded.

What would be the best way to make sure that no second refresh token request is made while the first is still running?



from Parallel refresh requests of OAuth2 access token with Swift p2/OAuth2

No comments:

Post a Comment