Our current flow uses JWTs and at this point in the project, we cannot change that. How can I implement session-like functionality with auto-signout after periods of inactivity using JWT refresh tokens?
Is this already supported in the Auth0 library? I’m trying to get a clear picture of what the code should look like and the standard way to implement this.
We currently access the token in the middleware, but don’t know what to do from there.
Another important thing that I’m not sure how to get around is that when using withMiddlewareAuthRequired in the middleware, the middleware doesn’t run once the auth expires so I can’t redirect to sign out.
Inside you application’s settings, under the Refresh Token Expiration you can set the desired timeframe that a refresh token will expire due to inactivity as seen below: