-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feature/#1/kakao social login setting #8
Feature/#1/kakao social login setting #8
Conversation
|
||
useEffect(() => { | ||
// // FIXME: 백엔드 API에 따라 주소 수정 필요 | ||
axios |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 부분은 Axios 인터셉터에 정의되어있는 api
로 호출해서 쓰면 좋을 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 코드 확인하고 수정하겠습니다!
src/app/login/KakaoLogin.tsx
Outdated
const REST_API_KEY: string = import.meta.env.REST_API_KEY; | ||
const REDIRECT_URI: string = import.meta.env.REDIRECT_URI; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VITE_
프리픽스를 앞에 명시해줘야 환경 변수가 잘 동작하지 않나요?! 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네네 맞습니다. 그 부분을 체크 못했네요!! 수정하겠습니다. 감사합니다~
src/app/login/KakaoLogin.tsx
Outdated
const REST_API_KEY: string = import.meta.env.REST_API_KEY; | ||
const REDIRECT_URI: string = import.meta.env.REDIRECT_URI; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const REST_API_KEY: string = import.meta.env.REST_API_KEY; | |
const REDIRECT_URI: string = import.meta.env.REDIRECT_URI; | |
const REST_API_KEY: string = import.meta.env.VITE_REST_API_KEY; | |
const REDIRECT_URI: string = import.meta.env.VITE_REDIRECT_URI; |
src/app/login/KakaoLogin.tsx
Outdated
const Login = () => { | ||
const REST_API_KEY: string = import.meta.env.REST_API_KEY; | ||
const REDIRECT_URI: string = import.meta.env.REDIRECT_URI; | ||
const link: string = `https://kauth.kakao.com/oauth/authorize?client_id=${REST_API_KEY}&redirect_uri=${REDIRECT_URI}&response_type=code`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const link: string = `https://kauth.kakao.com/oauth/authorize?client_id=${REST_API_KEY}&redirect_uri=${REDIRECT_URI}&response_type=code`; | |
const link: string = `https://kauth.kakao.com/oauth/authorize?client_id=${VITE_REST_API_KEY}&redirect_uri=${VITE_REDIRECT_URI}&response_type=code`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 ~!
+) 아 시현님 포크해서 작업하시는군요..! 깃헙 액션 워크플로우에서 타겟 브랜치가 main
으로 작성돼있는데 포크해서 PR하면 브랜치명이 depromeet/layer:main
이 돼서 빌드 테스트가 누락되는 것 같네요 !! 요거 추가해서 다시 올리겠습니다!
src/app/login/KakaoLogin.tsx
Outdated
const Login = () => { | ||
const REST_API_KEY: string = import.meta.env.REST_API_KEY; | ||
const REDIRECT_URI: string = import.meta.env.REDIRECT_URI; | ||
const link: string = `https://kauth.kakao.com/oauth/authorize?client_id=${REST_API_KEY}&redirect_uri=${REDIRECT_URI}&response_type=code`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
값이 이미 문자열이라, 타입이 자동 추론돼서 생략해도 될 것 같습니당!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 TS프로젝트가 처음이라... 민희님 말씀대로 추론이 가능한 경우에 생략과 그래도 확실한 명시 중에 어떤 방식이 좋은건가요?? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 추론이 가능한 경우라면 코드 간결성을 위해 생략하는 게 좋다고 생각해요! vscode에서는 변수에 마우스 올리면 타입을 볼 수 있어서 따로 명시하지 않아도 된다고 생각합니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good~ 고생했어~
🏄🏼♂️ Summary (요약)
🫨 Describe your Change (변경사항)
🧐 Issue number and link (참고)
📚 Reference (참조)