mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(core): set JWT authentication token sameSite policy to lax (#4425)
set authentication token sameSite policy to lax
This commit is contained in:
parent
5745027cee
commit
1f4eaeb3ae
|
@ -63,5 +63,9 @@ export async function resolveJwt(token: string): Promise<User> {
|
|||
|
||||
export async function issueCookie(res: Response, user: User): Promise<void> {
|
||||
const userData = issueJWT(user);
|
||||
res.cookie(AUTH_COOKIE_NAME, userData.token, { maxAge: userData.expiresIn, httpOnly: true });
|
||||
res.cookie(AUTH_COOKIE_NAME, userData.token, {
|
||||
maxAge: userData.expiresIn,
|
||||
httpOnly: true,
|
||||
sameSite: 'lax',
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue