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

Next Auth 카카오 로그인 #63

Merged
merged 19 commits into from
May 20, 2023
Merged

Next Auth 카카오 로그인 #63

merged 19 commits into from
May 20, 2023

Conversation

oyeon-kwon
Copy link
Collaborator

@oyeon-kwon oyeon-kwon commented May 12, 2023

🤔 해결하려는 문제가 무엇인가요?

close #44

🎉 변경 사항

  • next-auth를 활용해 카카오 로그인 버튼을 만들었어요.

🙏 여기는 꼭 봐주세요!

  • 테스트 코드가 올바르게 짠게 맞는지 모르겠네요..
  • 오잉 근데 .yarn/cache 파일이 다 올라갔는데 이게 맞나요..?

사용 방법

  • env 파일 추가가 필요합니다.
    👉 env 노션 문서
  • 카카오 디벨로퍼는 제 아이디로 우선 해 놓았습니다!

🌄 스크린샷

스크린샷 2023-05-12 오전 12 59 35 스크린샷 2023-05-12 오전 12 59 43

📚 참고

  • 상조님이 에러 해결 도와주심🙏🏻🙏🏻 감사합니동

@oyeon-kwon oyeon-kwon self-assigned this May 12, 2023
@github-actions github-actions bot added the test: unit Generate or update unit test label May 12, 2023
@hyesungoh
Copy link
Member

넵 캐시 파일 올라오는 거 맞아요!

Copy link
Member

@hyesungoh hyesungoh left a comment

Choose a reason for hiding this comment

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

👍 👍 고생하셨습니다!!

pageExtensions 설정이랑 pages 하위 routes들 파일명만 원복해주시면 좋을 거 같아요 !

next.config.js Outdated
Comment on lines 16 to 17
},
pageExtensions: ['page.tsx'],
swcMinify: true,
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
Member

Choose a reason for hiding this comment

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

요 파일 때문에 pageExtensions 지우셨으면 [...nextauth].page.ts 하면 되지 않을까 싶어요!

api route를 위 설정과 같이 써보진 않아서 확실하진 않아요 ...!

Copy link
Collaborator Author

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.

흐엉 안되네욥..ㅠ

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 12, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: fc978d4
Status: ✅  Deploy successful!
Preview URL: https://0bc93b73.na-lab.pages.dev
Branch Preview URL: https://issue-44.na-lab.pages.dev

View logs

@codecov-commenter
Copy link

codecov-commenter commented May 13, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.44 🎉

Comparison is base (3890b83) 97.52% compared to head (fc978d4) 97.96%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #63      +/-   ##
==========================================
+ Coverage   97.52%   97.96%   +0.44%     
==========================================
  Files          17       29      +12     
  Lines         121      197      +76     
  Branches       23       33      +10     
==========================================
+ Hits          118      193      +75     
- Misses          3        4       +1     
Impacted Files Coverage Δ
...c/components/kakaoLoginButton/KakaoLoginButton.tsx 100.00% <100.00%> (ø)

... and 14 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

github-actions bot commented May 13, 2023

Bundle Sizes

Compared against 25bf0fe

Route Size (gzipped) Diff
/_app 176.66 KB +8.94 KB

Dynamic import: None found.

@hyesungoh hyesungoh self-requested a review May 13, 2023 06:43
@hyesungoh hyesungoh added the feat New feature or request label May 13, 2023
Copy link
Member

@sjoleee sjoleee left a comment

Choose a reason for hiding this comment

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

LGTM~

@@ -14,7 +14,7 @@ const nextConfig = {
appDir: false,
forceSwcTransforms: true,
},
pageExtensions: ['page.tsx'],
pageExtensions: ['page.tsx', 'page.ts'],
Copy link
Member

Choose a reason for hiding this comment

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

👍

Comment on lines 7 to 8
clientId: process.env.KAKAO_CLIENT_ID,
clientSecret: process.env.KAKAO_CLIENT_SECRET,
Copy link
Member

Choose a reason for hiding this comment

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

NEXT_PUBLIC 프리픽스 없어도 작동하나유?!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

네넹 되긴하던데 깔끔하게 붙여서 다시 올렸어유~

@hyesungoh
Copy link
Member

hyesungoh commented May 13, 2023

@oyeon-kwon 요거 배포 환경에서 안되는 것 해결하고 머지하면 좋을 거 같아요 !

그리고 (당장은 아니지만) 에러일 시 보여질 페이지도 ... 있어야될 거 같긴 합니다 ㅋㅋㅋ ㅠㅠ

@oyeon-kwon
Copy link
Collaborator Author

공식문서에 보면 vercel이나 netlify도 마찬가지로 랜덤url 생성되는 미리보기 배포가 있는데, 그래서 NEXTAUTH_URL을 안써도 된다고 나오더라구요!

근데 cloudflare에 대한 정보는 없길래 next-auth 레포에 질문 올려놨습니당
👉 nextauthjs/next-auth#7542

답변 오면 조치해볼게요!!

@hyesungoh
Copy link
Member

공식문서에 보면 vercel이나 netlify도 마찬가지로 랜덤url 생성되는 미리보기 배포가 있는데, 그래서 NEXTAUTH_URL을 안써도 된다고 나오더라구요!

근데 cloudflare에 대한 정보는 없길래 next-auth 레포에 질문 올려놨습니당 👉 nextauthjs/next-auth#7542

답변 오면 조치해볼게요!!

https://next-auth.js.org/deployment#example

뭔가 이 예제처럼 preview 환경일 때 ... 를 따로 핸들링해줘야하나도 싶네요 🤔

@oyeon-kwon
Copy link
Collaborator Author

뭔가 이 예제처럼 preview 환경일 때 ... 를 따로 핸들링해줘야하나도 싶네요 🤔

실패... 주르륵

@oyeon-kwon oyeon-kwon merged commit 74b53d4 into main May 20, 2023
@oyeon-kwon oyeon-kwon deleted the issue/44 branch May 20, 2023 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request test: unit Generate or update unit test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

카카오 로그인
4 participants