fix(login): use /logout/done as success page, accept post_logout_redirect param as post logout uri (#10500)

Closes #10413

This PR changes the logout success page of the V2 login to
`/logout/done` and accepts both `post_logout_redirect` as well as
`post_logout_redirect_uri` as a param for the post logout url.

# Which Problems Are Solved

The new Login V2 aligns with the login V1  now.
Accepts `post_logout_redirect` as well as `post_logout_redirect_uri` as
a param for the post logout url.

# How the Problems Are Solved

Both search params are now accepted.
This commit is contained in:
Max Peintner
2025-08-18 07:38:37 +00:00
committed by GitHub
parent a637ae5aa5
commit 98fb8b4209
3 changed files with 7 additions and 22 deletions
@@ -16,12 +16,7 @@ type Props = {
organization?: string;
};
export function SessionsClearList({
sessions,
logoutHint,
postLogoutRedirectUri,
organization,
}: Props) {
export function SessionsClearList({ sessions, logoutHint, postLogoutRedirectUri, organization }: Props) {
const [list, setList] = useState<Session[]>(sessions);
const router = useRouter();
@@ -54,7 +49,7 @@ export function SessionsClearList({
params.set("organization", organization);
}
return router.push("/logout/success?" + params);
return router.push("/logout/done?" + params);
} else {
console.warn(`No session found for login hint: ${logoutHint}`);
}
@@ -72,12 +67,8 @@ export function SessionsClearList({
.filter((session) => session?.factors?.user?.loginName)
// sort by change date descending
.sort((a, b) => {
const dateA = a.changeDate
? timestampDate(a.changeDate).getTime()
: 0;
const dateB = b.changeDate
? timestampDate(b.changeDate).getTime()
: 0;
const dateA = a.changeDate ? timestampDate(a.changeDate).getTime() : 0;
const dateB = b.changeDate ? timestampDate(b.changeDate).getTime() : 0;
return dateB - dateA;
})
// TODO: add sorting to move invalid sessions to the bottom