diff --git a/lib/src/core/authentication-core.ts b/lib/src/core/authentication-core.ts index ac98034d..c5ee23de 100644 --- a/lib/src/core/authentication-core.ts +++ b/lib/src/core/authentication-core.ts @@ -556,7 +556,8 @@ export class AuthenticationCore { "No sign-in redirect URL has been found either. " ); } - const queryParams = new URLSearchParams(); + const queryParams: URLSearchParams = new URLSearchParams(); + queryParams.set("post_logout_redirect_uri", callbackURL); if (configData.sendIdTokenInLogoutRequest) { @@ -575,6 +576,7 @@ export class AuthenticationCore { } queryParams.set("state", SIGN_OUT_SUCCESS_PARAM); + return `${logoutEndpoint}?${queryParams.toString()}`; }