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

Feature/#1/kakao social login setting #8

Merged
merged 8 commits into from
Jul 4, 2024
Merged

Feature/#1/kakao social login setting #8

merged 8 commits into from
Jul 4, 2024

Conversation

sean2337
Copy link
Collaborator

@sean2337 sean2337 commented Jul 2, 2024

카카오 소셜 로그인 세팅


🏄🏼‍♂️‍ Summary (요약)

  • 카카오 소셜 로그인 세팅 진행했습니다.

🫨 Describe your Change (변경사항)

  • kakao Social Login 진행했을때 Redirection 가게 되는 페이지 내에서 관련 기능 수행할 수 있도록 코드를 구성하였습니다.
  • 단, 아직 관련 key와 URL이 나오지 않아 Test는 진행하지 않았습니다. 나오면 Test 진행하겠습니다.
  • 우선은 틀만 개발!!

🧐 Issue number and link (참고)

📚 Reference (참조)

@sean2337 sean2337 added the 📚 setting Setting label Jul 2, 2024
@sean2337 sean2337 added this to the v1.0.0 milestone Jul 2, 2024
@sean2337 sean2337 self-assigned this Jul 2, 2024

useEffect(() => {
// // FIXME: 백엔드 API에 따라 주소 수정 필요
axios
Copy link
Member

Choose a reason for hiding this comment

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

해당 부분은 Axios 인터셉터에 정의되어있는 api로 호출해서 쓰면 좋을 것 같아요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

넵 코드 확인하고 수정하겠습니다!

Comment on lines 2 to 3
const REST_API_KEY: string = import.meta.env.REST_API_KEY;
const REDIRECT_URI: string = import.meta.env.REDIRECT_URI;
Copy link
Member

Choose a reason for hiding this comment

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

VITE_ 프리픽스를 앞에 명시해줘야 환경 변수가 잘 동작하지 않나요?! 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

네네 맞습니다. 그 부분을 체크 못했네요!! 수정하겠습니다. 감사합니다~

Comment on lines 2 to 3
const REST_API_KEY: string = import.meta.env.REST_API_KEY;
const REDIRECT_URI: string = import.meta.env.REDIRECT_URI;
Copy link
Member

@klmhyeonwoo klmhyeonwoo Jul 2, 2024

Choose a reason for hiding this comment

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

Suggested change
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;

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`;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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`;

Copy link
Member

@leeminhee119 leeminhee119 left a 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이 돼서 빌드 테스트가 누락되는 것 같네요 !! 요거 추가해서 다시 올리겠습니다!

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`;
Copy link
Member

Choose a reason for hiding this comment

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

값이 이미 문자열이라, 타입이 자동 추론돼서 생략해도 될 것 같습니당!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

제가 TS프로젝트가 처음이라... 민희님 말씀대로 추론이 가능한 경우에 생략과 그래도 확실한 명시 중에 어떤 방식이 좋은건가요?? 🤔

Copy link
Member

Choose a reason for hiding this comment

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

저는 추론이 가능한 경우라면 코드 간결성을 위해 생략하는 게 좋다고 생각해요! vscode에서는 변수에 마우스 올리면 타입을 볼 수 있어서 따로 명시하지 않아도 된다고 생각합니다

Copy link
Member

@klmhyeonwoo klmhyeonwoo left a comment

Choose a reason for hiding this comment

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

Good~ 고생했어~

@sean2337 sean2337 merged commit 0e3519b into depromeet:main Jul 4, 2024
1 check passed
@sean2337 sean2337 deleted the feature/#1/kakao-socialLogin_setting branch July 4, 2024 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants