Skip to content

Commit

Permalink
[๐Ÿšจ fix] ๋ชจ๋ฐ”์ผ ๊ฒฐ์ œ ์‹œ ๋‘๋ฒˆ ๊ฒฐ์ œ ์ •๋ณด๊ฐ€ ๋“ค์–ด๊ฐ€๋Š” ๋ฌธ์ œ ์ฒ˜๋ฆฌ๋ฅผ ์œ„ํ•œ samesite ์†์„ฑ ๋ณ€๊ฒฝ #100
Browse files Browse the repository at this point in the history
  • Loading branch information
eeeyooon committed Apr 9, 2024
1 parent c7ec1c9 commit 8b820af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/axios/serverInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const createServerInstance = (context: GetServerSidePropsContext) => {
httpOnly: false,
secure: process.env.NODE_ENV === 'production',
maxAge: 60 * 60 * 24,
sameSite: 'lax',
sameSite: 'none',
});

customConfig.isRetryRequest = true;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/auth/reissue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default async function Reissue(
maxAge: 60 * 60 * 24,
httpOnly: false,
secure: process.env.NODE_ENV === 'production',
sameSite: 'lax',
sameSite: 'none',
});

res.status(200).json({
Expand Down
4 changes: 2 additions & 2 deletions src/pages/api/auth/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function Session(req: NextApiRequest, res: NextApiResponse) {
maxAge: 60 * 60 * 24,
httpOnly: false,
secure: process.env.NODE_ENV === 'production',
sameSite: 'lax',
sameSite: 'none',
});

setCookie('refreshToken', refreshToken, {
Expand All @@ -25,7 +25,7 @@ export default function Session(req: NextApiRequest, res: NextApiResponse) {
maxAge: 60 * 60 * 24,
httpOnly: true,
secure: process.env.NODE_ENV === 'production',
sameSite: 'lax',
sameSite: 'none',
});

res.status(200).json({ message: 'ํ† ํฐ ์ €์žฅ ์„ฑ๊ณต' });
Expand Down

0 comments on commit 8b820af

Please sign in to comment.