Competing refresh token requests can cause concurrent update issues on PostgreSQL #3604
Open
3 of 5 tasks
Labels
bug
Something is not working.
Preflight checklist
Ory Network Project
No response
Describe the bug
When executing two token refresh requests in parallel, with the same OAuth2 Client ID and OAuth2 Refresh Token, a situation may arise where:
Error payloads are as follows:
Reproducing the bug
Relevant log output
No response
Relevant configuration
No response
Version
master
On which operating system are you observing this issue?
None
In which environment are you deploying?
None
Additional Context
I believe the issue is that we have one big transaction that is used for refresh tokens. It:
The code for this is here:
https://github.com/ory/fosite/blob/1df109bb45fadd90b34c3d15cbc7431426cc9853/handler/oauth2/flow_refresh.go#L136-L167
Kind of related: #1831
There are two ways to fix this:
The text was updated successfully, but these errors were encountered: