Skip to content

Commit

Permalink
fix: remove deleting cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
unewMe authored Sep 11, 2024
1 parent 220167c commit 9116465
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,9 @@ export async function middleware(request: NextRequest) {
}

if (isFailed) {
request.cookies.delete("access_token");
request.cookies.delete("access_token");

if (request.nextUrl.pathname.startsWith("/app")) {
const response = NextResponse.redirect(new URL("/login", request.url));

response.cookies.delete("access_token");
response.cookies.delete("access_token_secret");

return response;
}
}
Expand Down

0 comments on commit 9116465

Please sign in to comment.