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

SDK: Token refresh failed with concurrent requests #12648

Closed
lubrst opened this issue Apr 8, 2022 · 0 comments · Fixed by #12649
Closed

SDK: Token refresh failed with concurrent requests #12648

lubrst opened this issue Apr 8, 2022 · 0 comments · Fixed by #12649

Comments

@lubrst
Copy link
Contributor

lubrst commented Apr 8, 2022

Describe the Bug

Scenario (see also #12636):

  1. A page of my vuejs webapp is open until the access token expires.
  2. Then a router link is clicked. Multiple simultaneous api requests are executed.
  3. The refresh request is triggered, but other requests fail with 403, because authorization header is empty.

The SDK is not waiting while a refresh is running.

I have a possible solution and will link a pull request.

To Reproduce

Perform multiple requests with the SDK with expired access token.

Errors Shown

No response

What version of Directus are you using?

9.8.0

What version of Node.js are you using?

16.14.2

What database are you using?

Postgres 14

What browser are you using?

Chrome, Edge, Firefox

How are you deploying Directus?

Docker

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

Successfully merging a pull request may close this issue.

2 participants