mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-26 14:28:46 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user