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] Google OAuth login #604

Merged
merged 7 commits into from
Aug 21, 2023
Merged

Conversation

jis-kim
Copy link
Contributor

@jis-kim jis-kim commented Aug 21, 2023

Summary

  • google oauth 를 이용한 로그인 방식을 추가했습니다.
  • 불필요한 console.log, ft guard check, @UseGuard() 데코레이터를 삭제했습니다.
  • 🐛 [Bug] 이미지 저장 볼륨 따로 파주세요 #599 에서 언급된 server 이미지 날아가는 문제를 volume 추가로 해결했습니다.

Describe your changes

  • google.strategy.ts, google.guard.ts 파일이 추가되었습니다.
  • 기존 AuthController 에 있던 로그인 후 signup/signin/2fa 구분하는 코드를 AuthService 로 옮겼습니다.
  • auth 도메인의 api path 들이 바뀌었습니다.
    • 기존 /auth/42login -> /auth/login/ft, /auth/callback/ft 로 변경
    • 기존 /auth/42login/2fa -> /auth/login/2fa 로 변경
    • google 로그인을 위해 /auth/login/google, /auth/callback/google 추가
    • 클라이언트 프로그래밍 하실 때 참고바랍니다.
  • .env 인자 추가 및 변경
    • 42 callback url 이 바뀌었으니 주의바랍니다.

Issue number and link

- .env.development 만 있을 경우를 위해 파일 경로 추가
- strategy 의 auth table 에 접근해서 유저 정보를 확인하는 로직을 auth service 로 변경
- ftGuard 의 에러 체크 loop 삭제
- LoginInfo 타입 변경, SocialResponseOptions 타입 추가
- web socket connect 시점의 console.log 삭제
- 통일성 있는 api 형태로 변경
- 쓰이지 않는 UseGuard 삭제
- google oauth 를 위한 configuration 모듈 생성
- ft configuration callback 변수 이름을 FORTYTWO_CALLBACK_URL 으로 변경
@jis-kim jis-kim added enhancement New feature or request backend issue for backend labels Aug 21, 2023
@jis-kim jis-kim added this to the Sprint14 milestone Aug 21, 2023
@jis-kim jis-kim self-assigned this Aug 21, 2023
Copy link
Member

@nyeoni nyeoni left a comment

Choose a reason for hiding this comment

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

우와 좋습니다!! 고생하셨습니다! :) 변경내용 프론트에도 바로 적용해놓겠습니당~!! 👍

@nyeoni
Copy link
Member

nyeoni commented Aug 21, 2023

@jis-kim 프론트도 url 변경 완료하였습니다! 확인해주시고 괜찮으시면 바로 머지 부탁드릴게용 >_< 👍

@jis-kim jis-kim merged commit c57d34d into develop Aug 21, 2023
1 check passed
@jis-kim jis-kim deleted the feature/back/google-oauth branch August 21, 2023 08:37
nyeoni added a commit that referenced this pull request Aug 22, 2023
Co-authored-by: nyeoni <skdusdl8804@gmail.com>
nyeoni added a commit that referenced this pull request Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend issue for backend enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [Bug] 이미지 저장 볼륨 따로 파주세요 ✨ [Feature] google 로그인
2 participants