Skip to content

Commit 741c06f

Browse files
fix cookie path
1 parent 9024740 commit 741c06f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

server/api/auth/atproto.get.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function encodeOAuthState(event: H3Event, data: OAuthStateData): string {
154154
// secure only if NOT in dev mode
155155
secure: !import.meta.dev,
156156
sameSite: 'lax',
157-
path: event.path,
157+
path: event.path.split('?', 1)[0],
158158
})
159159
return JSON.stringify({ data, sid })
160160
}
@@ -195,7 +195,7 @@ function decodeOAuthState(event: H3Event, state: string | null): OAuthStateData
195195
httpOnly: true,
196196
secure: !import.meta.dev,
197197
sameSite: 'lax',
198-
path: event.path,
198+
path: event.path.split('?', 1)[0],
199199
})
200200
} else {
201201
throw createError({

0 commit comments

Comments
 (0)