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

[CHORE] 쿠키 value 상수 변경 #142

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions src/constants/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { env } from '@/lib/env';
export const KAKAO_LOGIN_URL = `${env.KAKAO_AUTH_URL}?response_type=code&client_id=${env.KAKAO_REST_API_KEY}&redirect_uri=${env.KAKAO_LOGIN_REDIRECT_URI}`;

export const TOKEN = {
ACCESS_TOKEN: 'accessToken',
REFRESH_TOKEN: 'refreshToken',
ACCESS_TOKEN: 'Access-Token',
REFRESH_TOKEN: 'Refresh-Token',
};

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 왜 바꾸는걸까요?!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

백엔드 명세 변경때문입니다!

export const CALLBACK_URL = 'callbackUrl';
Expand Down
4 changes: 3 additions & 1 deletion src/lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export const isProduction = process.env.NODE_ENV === 'production';
export const env = Object.freeze({
KAKAO_AUTH_URL: `${process.env.NEXT_PUBLIC_KAKAO_AUTH_URL}`,
KAKAO_REST_API_KEY: `${process.env.NEXT_PUBLIC_KAKAO_REST_API_KEY}`,
KAKAO_LOGIN_REDIRECT_URI: `${process.env.NEXT_PUBLIC_KAKAO_LOGIN_REDIRECT_URI}`,
KAKAO_LOGIN_REDIRECT_URI: isDevelopment
? `${process.env.NEXT_PUBLIC_DEV_KAKAO_LOGIN_REDIRECT_URI}`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isProd라는 util 함수를 만들어도 좋겠네요?!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요 파일 위에 isDevelopment와 isProduction 두개다 있습니다!

: `${process.env.NEXT_PUBLIC_PRD_KAKAO_LOGIN_REDIRECT_URI}`,
BASE_API_URL: `${process.env.NEXT_PUBLIC_BASE_API_URL}`,
});
Loading