#dev 2026-11-17

2026-11-17 UTC
CrimeWave, ghorsey_mobile_, troojg and rjomara5853 joined the channel
#
GWG
Does anyone know what the recommended lifespan of a refresh token is?
#
[social]
Depends what the token is for. I have some that are 24 to 48 hours. Others are a couple weeks, but most are three months to a year. If tokens are temporary and you want new tokens the 24 to 48 hours is a decent option. If it is for a project duration a couple weeks should work. If it is for your own needs the many months is a decent option.
#
GWG
Well, the WordPress IndieAuth default is 14 days unless you change it in the settings. The refresh token expires shortly thereafter, which created a problem because my new app didn't refresh in time, so I'm trying to plan a fix.
grufwub and troojg joined the channel
#
[social]
Give it a two day buffer or 7 day for the refresh
#
GWG
I opened an issue. I want to see what comments I get. Honestly, 5 minutes is probably too short
grufwub, barnaby, Maxpm, [Murray], ghorsey_mobile, JoshuaMorris, ax562, valis2030, decipaliz, chrisburnell, paultibbetts, jone42, thatoddshade, TwinAdam, ghorsey_mobile_ and ghorsey_mobile__ joined the channel
#
Zegnat
I went with a 30 day max lifetime for the sign-in session, but with a 7 day idle lifetime on the tokens. If a refresh token is not used for 7 days it expires and I need to auth again. Every time you use the refresh token a new one is issued, so an old leaked token cannot be used, but the reissues stop working at 30 days and then I need to auth anew.
#
Zegnat
I think I picked up that separate idle lifetime from Okta at some point
chrisburnell, thatoddshade, mcepl and barnaby joined the channel
#
GWG
How do you convey that to the client
thatoddshade joined the channel
#
[snarfed]
I assume the usual 401 + refresh loop, same as with an expired or revoked token
#
GWG
I meant the idle part
ax562, pimeille, [Sophia] and JadedBlueEyes15 joined the channel
#
Zegnat
refresh_token_timeout for the idle part, authorization_expires_in for the total auth lifetime. Borrowed from a draft spec https://datatracker.ietf.org/doc/html/draft-ietf-oauth-refresh-token-expiration-03#section-6.1
#
Zegnat
But otherwise, yes, just the usual thing for clients: when a token stops working they need to re-auth ;)
CrimeWave, daemonspudguy and Saige_Leah joined the channel