Skip to content
This repository was archived by the owner on Jun 29, 2025. It is now read-only.

Commit bfbe8de

Browse files
authored
fix(oauth): add post_logout_redirect_uri to OAuth logout redirect URI (#638)
* Add `post_logout_redirect_uri` to OAuth logout redirect URI Signed-off-by: Marvin A. Ruder <signed@mruder.dev> * Update OAuth2 configuration documentation Signed-off-by: Marvin A. Ruder <signed@mruder.dev> --------- Signed-off-by: Marvin A. Ruder <signed@mruder.dev>
1 parent d5cd300 commit bfbe8de

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

backend/src/auth/auth.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ export class AuthService {
274274
URL.canParse(configuration.end_session_endpoint)
275275
) {
276276
const redirectURI = new URL(configuration.end_session_endpoint);
277+
redirectURI.searchParams.append("post_logout_redirect_uri", this.config.get("general.appUrl"));
277278
redirectURI.searchParams.append("id_token_hint", idTokenHint);
278279
redirectURI.searchParams.append(
279280
"client_id",

docs/docs/setup/oauth2login.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ Redirect URL: `https://<your-domain>/api/oauth/callback/discord`
4242

4343
Generic OpenID Connect provider is also supported, we have tested it on Keycloak, Authentik and Casdoor.
4444

45-
Redirect URL: `https://<your-domain>/api/oauth/callback/oidc`
45+
Redirect URI: `https://<your-domain>/api/oauth/callback/oidc`
46+
47+
Post Logout Redirect URI: `https://<your-domain>`
4648

4749
## Custom your OAuth 2 Provider
4850

0 commit comments

Comments
 (0)