They are presented to the AS to get a new access token, and the AS has pretty good insight into whether a user is logged in or signed out, right?
I think it's dubious to call refresh tokens "difficult-to-revoke" but call sessions easy to revoke. Both require some kind of state. The difference is that you are (hopefully) doing far more grants and checks on tokens than you are doing revokes - so why not optimize for that flow?
About the same amount of effort from my perspective, and revokes are probably extremely rare by comparison to issues or validations of tokens/sessions...
And since you are likely adding more sessions than you are manually revoking them, why not optimize for that flow and use JWTs? Sure they may not be 100% stateless if you have to maintain the blacklist, but I'd say 99.9% stateless is still preferable over 0% stateless for many applications.
The jwt being valid 10 minutes (accounting for clock drift) might be a problem - but probably sufficient for many applications?
Agreed! You should never make tokens long lived. Seconds to minutes is what we typically see.
"But won't users have to log in whenever the token expires?" Nope, that's what the refresh grant (in the OAuth world) is for. I am not as familiar with other uses of JWT, but I suspect there is a similar process that relies on the issuer for them.
> But at that point, it's no longer stateless.
Agreed, it is an architectural choice. You can choose the benefits of statelessness (scale) at a cost of revocation difficulties. You can get revocation, but you have to re-introduce state.
Is there some token solution out that that I'm unaware of that gives you statelessness and revocation? Would love to learn more about it if so.