We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4ce829 commit c1fe7eeCopy full SHA for c1fe7ee
lib/auth.ts
@@ -135,8 +135,20 @@ export async function getOAuthState(): Promise<{ state: string | null; codeVerif
135
136
export async function clearOAuthState(): Promise<void> {
137
const cookieStore = await cookies();
138
- cookieStore.delete(OAUTH_CONFIG.STATE_COOKIE_NAME);
139
- cookieStore.delete(OAUTH_CONFIG.CODE_VERIFIER_COOKIE_NAME);
+ cookieStore.delete({
+ name: OAUTH_CONFIG.STATE_COOKIE_NAME,
140
+ httpOnly: true,
141
+ secure: true,
142
+ sameSite: "lax",
143
+ path: "/",
144
+ });
145
146
+ name: OAUTH_CONFIG.CODE_VERIFIER_COOKIE_NAME,
147
148
149
150
151
152
}
153
154
// OAuth URL builders
0 commit comments