fix(auth): avoid stale redirects after auth changes

Use full-page navigation after login/logout so the dashboard reloads
with the fresh auth cookie, and mark login/logout responses no-store.

Fixes #2100

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
EmirhanandCursor authored and decolua committed 2026-06-26 11:39:49 +07:00
1 parent ab5ec52f28
commit 6e9c7bf448
5 files changed
+10 -19

No files matched your search

+1 -1
View File
@@ -8,5 +8,5 @@ export async function POST() {
cookieStore.delete("oidc_state");
cookieStore.delete("oidc_nonce");
cookieStore.delete("oidc_code_verifier");
return NextResponse.json({ success: true });
return NextResponse.json({ success: true }, { headers: { "Cache-Control": "no-store" } });
}