Skip to content

Commit 355de8a

Browse files
committed
feat: 토큰 발급 방식 변경
1 parent 2e83c45 commit 355de8a

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/controller/user_controller.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,19 @@ export class UserController extends Controller {
3838
const { accessToken, refreshToken } = await generateTokens({ id: user_id, email: email });
3939

4040
// 3. 보안 쿠키에 Refresh Token 설정
41-
req.res.cookie('refreshToken', refreshToken, {
42-
httpOnly: true,
43-
secure: false,
44-
sameSite: 'lax',
45-
maxAge: 7 * 24 * 60 * 60 * 1000, // 7일
46-
});
41+
// req.res.cookie('refreshToken', refreshToken, {
42+
// httpOnly: true,
43+
// secure: false,
44+
// sameSite: 'lax',
45+
// maxAge: 7 * 24 * 60 * 60 * 1000, // 7일
46+
// });
4747

4848
// 4. Access Token은 JSON 응답으로 보내거나 쿼리 파라미터로 리다이렉트
4949
// 프론트엔드 대시보드로 리다이렉트 시 예시:
5050
// 나중에 실제 주소로 리다이렉트 할 것
51-
req.res.redirect(`http://localhost:5173/onboarding?accessToken=${accessToken}`);
51+
req.res.redirect(
52+
`http://localhost:5173/onboarding?accessToken=${accessToken}&refreshToken=${refreshToken}`,
53+
);
5254
}
5355

5456
@Get('/info')

0 commit comments

Comments
 (0)