mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-10 12:57:49 +00:00
Update OAuth docs
The cookie should be ``lax`` in order to be send to the redirect target as the sign in OAuth flow is cross site. Keep in mind that with a lax session cookie you should make some checks when receiving requests to sensitive endpoints. Easy way, save a strict cookie with the same session and check they are the same in a middleware for your sensitive routes.
This commit is contained in:
@@ -68,7 +68,7 @@ export const GET = async ({ redirect, cookies, url }) => {
|
|||||||
|
|
||||||
// Set the session cookie
|
// Set the session cookie
|
||||||
cookies.set(SESSION_COOKIE, session.secret, {
|
cookies.set(SESSION_COOKIE, session.secret, {
|
||||||
sameSite: "strict",
|
sameSite: "lax",
|
||||||
expires: new Date(session.expire),
|
expires: new Date(session.expire),
|
||||||
secure: true,
|
secure: true,
|
||||||
httpOnly: true,
|
httpOnly: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user