If you use Authentik as your SSO solution, you might notice that you are getting logged out every day. At least that’s how I described it at first. Here’s what I did to fix that.
I knew that on all the providers I had created, I had set the token validity to be 24h. So naturally, the first thing I tried was to change that. You can do that by going to each provider you want to change in Applications -> Providers
, click the provider, click Edit
and update Token validity
to hours=186
or days=7
as in the screenshot below:

However, I noticed this was not enough, I was still getting logged out each day. I found that my session was still 24h. You can check that by going to Directory -> Users
, clicking the user and then going to the Credentials/Tokens
tab and the Sessions
submenu (selected by default). You will probably notice the same thing that was happening for me, the expiration is 24h, like in this screenshot:

Ok, so what do we do about it? You need to go to your flow in Flows and Stages -> Flows
. For me it’s default-authentication-flow
, I assume it’s the same for you if you need this tutorial. Open it, go to the Stage bindings
tab and click the Edit Stage
button next to the default-authentication-login
stage (should be the last one). There you can set the Session duration
to days=7
like in the screenshot below.

Now you can logout and back in, and go check that your session expires in 7 days:

Hope this helps, have fun clickity-clacking.
Leave a Reply