Skip to content

Commit

Permalink
Feat: Add same site
Browse files Browse the repository at this point in the history
  • Loading branch information
Ho-s committed Jun 29, 2024
1 parent b9f63a1 commit 07c2c79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Response } from 'express';

import { KakaoInfo } from 'src/common/decorators/kakao-info.decorator';
import { KakaoGuard } from 'src/common/guards/kakao.guard';
import { NODE_ENVIRONMENT } from 'src/common/helper/env.validation';
import { UserProvider } from 'src/entities';

import { AuthService } from './auth.service';
Expand Down Expand Up @@ -34,6 +35,11 @@ export class AuthController {

res.cookie('Authorization', 'Bearer ' + user.accessToken, {
httpOnly: true,
sameSite: 'none',
secure:
this.configService.get('NODE_ENV') === NODE_ENVIRONMENT['production']
? true
: false,
});

return res.redirect(302, this.configService.get('CLIENT_URL'));
Expand Down

0 comments on commit 07c2c79

Please sign in to comment.