Repository navigation
providers/oauth: post_logout_redirect_uri support - #20011
Conversation
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #20011 +/- ##
==========================================
- Coverage 93.66% 92.64% -1.03%
==========================================
Files 1001 1017 +16
Lines 56884 58527 +1643
Branches 0 1494 +1494
==========================================
+ Hits 53282 54221 +939
- Misses 3602 4266 +664
- Partials 0 40 +40
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-5da66d8ed05c74c0d3dd7ba425dd10aaeb4f164d
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-5da66d8ed05c74c0d3dd7ba425dd10aaeb4f164dAfterwards, run the upgrade commands from the latest release notes. |
Co-authored-by: Jens L. <[email protected]> Signed-off-by: Connor Peshek <[email protected]>
Co-authored-by: Jens L. <[email protected]> Signed-off-by: Connor Peshek <[email protected]>
|
We've been struggling with this for a while — After applying this patch via volume mount on 2026.2.0, the full logout flow finally works as expected:
One thing worth noting: the patch introduces Thanks for pushing this forward. This is a real gap that affects anyone using RP-Initiated Logout with OIDC clients. |
BeryJu
left a comment
There was a problem hiding this comment.
Some nits for imo cleaner import flow but lgtm
| ) | ||
| from authentik.lib.avatars import DEFAULT_AVATAR, get_avatar | ||
| from authentik.lib.utils.reflection import class_to_path | ||
| from authentik.providers.oauth2.models import AccessToken, OAuth2Provider |
There was a problem hiding this comment.
Ideally "core" apps like flows shouldn't import statically from "modular" apps like the oauth2 provider
| PLAN_CONTEXT_IS_REDIRECTED = "is_redirected" | ||
| PLAN_CONTEXT_REDIRECT_STAGE_TARGET = "redirect_stage_target" | ||
| # OIDC RP-Initiated Logout context keys | ||
| PLAN_CONTEXT_POST_LOGOUT_REDIRECT_URI = "goauthentik.io/providers/oauth2/post_logout_redirect_uri" |
There was a problem hiding this comment.
similar to https://github.com/goauthentik/authentik/pull/20011/changes#r3011402379 ideally should be in oauth constants
* oauth2/providers: add post logout redirect uri to providers * properly handle post_logout_redirect_uri and frontchannel message to rp * add backchannel support * move logout url logic * hanlde forbidden_uri_schemes on post_logout_redirect_uri * merge post_logout with redirect_uri --------- Signed-off-by: Connor Peshek <[email protected]> Co-authored-by: Jens L. <[email protected]>
* oauth2/providers: add post logout redirect uri to providers * properly handle post_logout_redirect_uri and frontchannel message to rp * add backchannel support * move logout url logic * hanlde forbidden_uri_schemes on post_logout_redirect_uri * merge post_logout with redirect_uri --------- Signed-off-by: Connor Peshek <[email protected]> Co-authored-by: Jens L. <[email protected]>
Details
This adds proper support for post_logout_redirect_uri with oidc logouts while largely improving the way we interact with RP's during rp-initiated logout. With this, we will:
Validate the post_logout_redirect_uri
Send a logout notification back to the rp via frontchannel or backchannel if properly configured on the provider
Delete the access token for the provider
Redirect you to the post_logout_redirect_uri location
closes #10430
closes #19201
ref #11710
Checklist
ak test authentik/)make lint-fix)If an API change has been made
make gen-build)If changes to the frontend have been made
make web)If applicable
make docs)