-
Notifications
You must be signed in to change notification settings - Fork 14
Description
The one-time refresh token can be refreshed twice
Description
It has the same behaviour in docker from fusionauth-containers
If the browser sends the refresh request simultaneously, the browser would decide which refresh token needs to be saved and it will break the customer session once access_token expires. And it would leave unused refresh token in FA DB for a while.
Affects versions
1.38.1, 1.36.7
Steps to reproduce
Steps to reproduce the behavior:
- Clone the fusionauth-containers
cd docker/fusionauthand Rundocker compose up- Setup the FA user / Login to FA admin
- Create a tenant (Select
One time usagefor Refresh Token usage) - Create an API key (connect it to tenant)
- Create an Application
6.1. connect it to the tenant
6.2. enable JWT
6.3. selectOne time usagefor Refresh Token usage on theJWTtab
6.4. enableGenerate Refresh Tokenson theSecuritytab
6.5. enableEnable JWT refreshon theSecuritytab - Copypaste APIkey, tenantId, applicationId to the script
- Run the script (use any unique string for script
./test.sh 123to repeat it, as that registers and additional user)
script to run (script requers jq) - See the refresh token was updated twice. The third request was rejected and it's hopefully good 🥲
Note that the script uses refresh & refresh & refresh to run the commands at the same time: https://www.thegeekdiary.com/what-is-the-difference-between-ampersand-and-double-ampersand-while-executing-simultaneous-commands-on-linux/
Expected behavior
Expecting to refresh only one time for the one-time refresh token, other should be denied as third request
Screenshots
Platform
- docker container
Related
Community guidelines
All issues filed in this repository must abide by the FusionAuth community guidelines.
