Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fe/bugfix/#584 최초 로그인 시 카카오톡 로그인 후 쿠키가 붙지 않음 #585

Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions frontend/.eslintrc.js → frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,24 @@ module.exports = {
browser: true,
es2021: true,
},
extends: ['plugin:pretter/recommended', 'plugin:react/recommended', 'plugin:react-hooks/recommended', 'plugin:@typescript-eslint/recommended', 'airbnb-typescript', 'plugin:import/recommended', 'prettier', 'plugin:storybook/recommended'],
plugins: ['prettier', 'react-refresh', 'import', 'eslint:recommended'],
extends: [
'plugin:prettier/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
'airbnb-typescript',
'plugin:import/recommended',
'prettier',
'plugin:storybook/recommended',
'eslint:recommended',
],
plugins: ['prettier', 'react-refresh', 'import'],
ignorePatterns: ['dist', '.eslintrc.cjs', 'vite.config.ts'],
settings: {
react: {
version: 'detect',
},
},

parser: '@typescript-eslint/parser',
parserOptions: {
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"@trivago/prettier-plugin-sort-imports": "4.1.1",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@types/socket.io-client": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"@vitejs/plugin-react": "^4.2.1",
Expand All @@ -68,6 +67,7 @@
"postcss": "^8.4.31",
"storybook": "7.5.3",
"tailwindcss": "^3.4.1",
"typescript": "^5.2.2",
"vite": "^5.0.11",
"vite-tsconfig-paths": "^4.2.3",
"vitest": "^1.3.0"
Expand Down
3 changes: 3 additions & 0 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions frontend/src/business/hooks/auth/useKakaoOAuthRedirect.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import axios from 'axios';
import { useNavigate } from 'react-router-dom';

import { isProdctionMode } from '@utils/env';

import { KAKAO_LOGIN_URL } from '@constants/kakao';

export function useKakaoOAuthRedirect() {
Expand All @@ -11,6 +13,10 @@ export function useKakaoOAuthRedirect() {
const res = await axios.get(KAKAO_LOGIN_URL, {
params: { code },
withCredentials: true,
headers: {
SameSite: 'None',
Secure: isProdctionMode(),
HeoJiye marked this conversation as resolved.
Show resolved Hide resolved
},
});

if (!res || res.status !== 200) {
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/utils/env.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function isProdctionMode() {
return import.meta.env.MODE === 'production';
}