Skip to content

Commit

Permalink
fix: include cookieOptions for deleteCookie (#651)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogukanakkaya authored Oct 26, 2023
1 parent 4e5df45 commit c8a121d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-carrots-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@supabase/auth-helpers-nextjs': patch
---

include cookie options for deleteCookie
1 change: 1 addition & 0 deletions packages/nextjs/src/routeHandlerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class NextRouteHandlerAuthStorageAdapter extends CookieAuthStorageAdapter {
protected deleteCookie(name: string): void {
const nextCookies = this.context.cookies();
nextCookies.set(name, '', {
...this.cookieOptions,
maxAge: 0
});
}
Expand Down

0 comments on commit c8a121d

Please sign in to comment.