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:
Emirhan
2026-06-26 11:39:49 +07:00
committed by decolua
co-authored by Cursor
parent ab5ec52f28
commit 6e9c7bf448
5 changed files with 10 additions and 19 deletions
+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" } });
}