• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

Compatibility of refresh token settings: sliding window and one-time use

Scheduled Pinned Locked Moved Unsolved
Q&A
refresh token
1
2
2.0k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    dan
    last edited by 21 Nov 2024, 15:49

    If you have one-time use refresh token, then every time it is used, you get a new refresh token.

    If you have a refresh token with a sliding window, every time you use it, its lifetime is extended.

    How are these settings compatible?

    --
    FusionAuth - Auth so modern you can download it.
    https://fusionauth.io

    D 1 Reply Last reply 21 Nov 2024, 15:53 Reply Quote 0
    • D
      dan @dan
      last edited by 21 Nov 2024, 15:53

      It's a subtle difference, but one-time use refers to the value of the refresh token, which you use against the /oauth2/token endpoint to get a new access token via the refresh grant.

      A sliding window refers to the refresh token itself, which has a unique id which stays the same, even as the value of the refresh token changes.

      So if you had a refresh token with a lifetime of 4 hours, a sliding window and one time use configured, you might end up with something like this:

      • at creation: id 09cfb961-291a-420f-b5cf-48c5c87a67cc, value RNhY5yE39t1o2FXKxgyH, lifetime 4 hours
      • when the RT is presented to the /oauth2/token endpoint 3 hours after creation: id 09cfb961-291a-420f-b5cf-48c5c87a67cc, value Fh95KZLfSMjMNxpR5B4c, lifetime 4 more hours
      • when the RT is presented to the /oauth2/token endpoint 3 hours later: id 09cfb961-291a-420f-b5cf-48c5c87a67cc, value baHneP4s0hBHPEk88GPC, lifetime 4 more hours

      More details here: https://github.com/FusionAuth/fusionauth-issues/issues/2925

      --
      FusionAuth - Auth so modern you can download it.
      https://fusionauth.io

      1 Reply Last reply Reply Quote 0
      1 out of 2
      • First post
        1/2
        Last post