Redis Cache iauthsession when using jwt

I’ve noticed that my Redis instance is accumulating iauthsessions.

Given I’m using the jwt token which is stateless, what purpose does the redis cache serve?

If nothing, how do I turn this persistence off ?

It wouldn’t be saved by the JWT AuthProvider, it would be saved by another AuthProvider you’re using. The session will be removed if you Authenticate with UseTokenCookie or by calling ConvertSessionToToken to convert your Authenticated UserSession to a JWT Token.

Otherwise if you override OnSaveSession() in your AppHost anywhere a Session is saved will be a noop.

public override void OnSaveSession(IRequest httpReq, IAuthSession session, TimeSpan? expiresIn = null) {}