Skip to content

Commit

Permalink
fix(auth): cookie same-site
Browse files Browse the repository at this point in the history
  • Loading branch information
didinele committed Aug 5, 2024
1 parent be3f78f commit 2bb7648
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/api/src/struct/Auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class Auth {
const options: CookieSerializeOptions = {
expires: credentials.refresh.expiration,
path: '/',
sameSite: Env.NODE_ENV === 'prod' ? 'none' : 'strict',
sameSite: Env.NODE_ENV === 'prod' ? 'strict' : 'lax',
httpOnly: true,
domain: Env.NODE_ENV === 'prod' ? `.${Env.ROOT_DOMAIN}` : undefined,
secure: Env.NODE_ENV === 'prod',
Expand All @@ -73,7 +73,7 @@ export class Auth {
const options: CookieSerializeOptions = {
expires: new Date(1_970),
path: '/',
sameSite: Env.NODE_ENV === 'prod' ? 'none' : 'strict',
sameSite: Env.NODE_ENV === 'prod' ? 'strict' : 'lax',
httpOnly: true,
domain: Env.NODE_ENV === 'prod' ? '.automoderator.app' : undefined,
secure: Env.NODE_ENV === 'prod',
Expand Down

0 comments on commit 2bb7648

Please sign in to comment.