This commit is contained in:
parent
08c7d3fc13
commit
e923336adc
|
|
@ -58,7 +58,22 @@ export default async function Login({
|
||||||
.maybeSingle();
|
.maybeSingle();
|
||||||
|
|
||||||
if (!homeWorkspace) {
|
if (!homeWorkspace) {
|
||||||
await supabase.auth.signOut();
|
|
||||||
|
// 清除当前请求的所有 cookie
|
||||||
|
const cookieStore = cookies();
|
||||||
|
const allCookies = cookieStore.getAll(); // 获取当前请求的所有 cookies
|
||||||
|
allCookies.forEach(({ name }) => {
|
||||||
|
cookieStore.set({
|
||||||
|
name,
|
||||||
|
value: "",
|
||||||
|
path: "/",
|
||||||
|
maxAge: 0,
|
||||||
|
httpOnly: true,
|
||||||
|
secure: true,
|
||||||
|
sameSite: "lax",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
return redirect(`/${localeString}/login?message=sessionExpired`);
|
return redirect(`/${localeString}/login?message=sessionExpired`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue