#How to end session on logout
1 messages · Page 1 of 1 (latest)
you are making logout from authentik or from another software ?
From one of the applications
you setup logout url in your application ?
Even if i logout of authentik I'm able to visit the application page without logging in gagain
Yes
i have a dotnet application that works fine logout
but i have a problem on start of authentik deploy
I get a page saying that I'm logged out
authentik page ?
But then if i visit app.domain.tld I'm able to access it directly no login flow
Yes
so when i try to accesss the app again it should re-direct me to login page right?
it just takes me directly back to the app after i'm logged out
maybe application is making auto login ?
there is no login/logout of application, it's just a simple page
so how you make logout ?
using url auth.domain.tld/outpost.goauthentik.io/sign_out it
you tested this with other application ?
This is my initial test
its looking a problem on your application not removing session
your application need to end session too
even after logging out from authentik my session for that specific app does not end
authentik is making they job
when i try to go to auth.mydomain.tld it asks me to login but app.mydomain.tld just opens
if i close my browser the session ends or if i delete the cookie for the site session ends
and then when i try app.mydomain.tld it asks me to login
You are describing an issue with your application.
yes it was a re-direction issue fixed it
but i have one more question after i'm logged out from the app i am needed to log out of authentik as well. Otherwise it automatically logs me back into the app as i have set implicit permission
is there a way through which i could logout of both at once??
or at least a way to make it so that if i login from the app, it only logs me in to the app and not authentik itself?
Can you explain how you fixed this? I'm having the same issue currently.
Added path /outpost.goauthentik.io/sign_out to my app url via authentik
I'm at work right now, after going back I'll send you a screenshot
I deploy traefik and authentik on truenas scale where traefik is my main ingress
auth.mydomain.tld/outpost.goauthentik.io/sign_out didn't work for me since i was using seperate apps, so i used app.mydomain.tld/outpost.goauthentik.io/sign_out
To do this i had to add the path /outpost.goauthentik.io/sign_out to my app in the ingress section of authentik
Thank you for the fast reply. So I'm using docker-compose. I'll need to figure out how to add that to the compose file.
Using forward auth uses your existing reverse proxy to do the proxying, and only uses the
Is this the portion you are talking about to change
Yup looks it I'll try it out
PathPrefix(`/outpost.goauthentik.io/sign_out`)" doesn't seem to have helped what I wanted it to
traefik.http.routers.authentik.rule: Host(`app.domain.tld`) && PathPrefix(`/outpost.goauthentik.io/`)
traefik.http.routers.authentik.rule: Host(`app.domain.tld`) && PathPrefix(`/outpost.goauthentik.io/`)
# `authentik-proxy` refers to the service name in the compose file.
traefik.http.middlewares.authentik.forwardauth.address: http://authentik-proxy:9000/outpost.goauthentik.io/auth/traefik
traefik.http.middlewares.authentik.forwardauth.trustForwardHeader: true
traefik.http.middlewares.authentik.forwardauth.authResponseHeaders: X-authentik-username,X-authentik-groups,X-authentik-email,X-authentik-name,X-authentik-uid,X-authentik-jwt,X-authentik-meta-jwks,X-authentik-meta-outpost,X-authentik-meta-provider,X-authentik-meta-app,X-authentik-meta-version
These are the current labels I have listed. So you are saying to have the app.domain.tld in this example as app.domain.tld/outpost.goauthentik.io/sign_out. Just making sure I'm understanding correctly.
this is my authentik chart
this is one of the apps i want to protect
and in traefik you have to configure the middleware
address would be different for you, i use truenas scale, which has a network so mine is like that.
i wasn't able to setup host regex on traefik and this was my workaround for that. If you are able to setup hostregex refer to the authentik document
maybe this might help you
authentik is an open-source Identity Provider focused on flexibility and versatility. We showed you the install, and now we'll show you how to use Traefik and NGINX Proxy Manager with Authentik to secure your applications.
Related Links:
Docs: https://docs.ibracorp.io/authentik/
Geek Circuit: https://geekscircuit.com/set-up-authentik-sso-with-...
Thank you @vague stirrup appreciate your time
were you able to solve your issue?