Skip to content

Commit

Permalink
Merge pull request #297 from Quickchive/fix/#294-add-domain-to-cookie
Browse files Browse the repository at this point in the history
fix: change cookie option
  • Loading branch information
stae1102 authored Mar 3, 2024
2 parents ed05790 + 64715a0 commit 750d9ac
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions src/auth/oauth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,21 +152,11 @@ export class OAuthService {
}

public getCookieOption() {
const cookieOption: CookieOptions =
process.env.NODE_ENV === 'prod'
? {
domain: process.env.FRONTEND_DOMAIN,
httpOnly: true,
sameSite: 'none',
secure: true,
}
: {
domain: process.env.FRONTEND_DOMAIN,
httpOnly: true,
sameSite: 'lax',
secure: false,
};

return cookieOption;
return {
domain: process.env.FRONTEND_DOMAIN,
httpOnly: true,
sameSite: 'none',
secure: true,
};
}
}

0 comments on commit 750d9ac

Please sign in to comment.