Skip to content

Commit

Permalink
fix: safari login
Browse files Browse the repository at this point in the history
  • Loading branch information
soomin9106 committed Aug 16, 2024
1 parent 97c5d7f commit 54b2312
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/shared/middlewares/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ export const AuthMiddleware = async ({ req, nextUrl }: authMiddlewareProps) => {

const response = NextResponse.redirect(nextUrl);

response.cookies.set(COOKIES.ACCESS_TOKEN, authData?.data?.accessToken);
response.cookies.set(COOKIES.REFRESH_TOKEN, authData?.data?.refreshToken);
response.cookies.set(COOKIES.ACCESS_TOKEN, authData?.data?.accessToken, {
maxAge: 24 * 60 * 60, // 30 days
});
response.cookies.set(COOKIES.REFRESH_TOKEN, authData?.data?.refreshToken, {
maxAge: 24 * 60 * 60, // 30 days
});

return response;
}
Expand Down

0 comments on commit 54b2312

Please sign in to comment.