Closed mdgarden closed 1 year ago
프론트가 로컬 개발 환경에서 로그인 할 수 있게 하는 방법 찾기
https://github.com/EasyAndBeauty/DailyReceipt-BE-WEB/blob/main/src/main/java/com/sprint/dailyreceipt/infra/kakao/KakaoApi.java#L39
@GetMapping("/auth/kakao/callback") public TokenResponse callbackOfKakao(@RequestParam String code){ KakaoTokenResponse kakaoTokenResponse = kakaoTokenClient.requestKakaoToken(KAKAO_CONTENT_TYPE, GRANT_TYPE, clientId, redirectUri, code, clientSecret); KakaoProfileResponse kakaoProfileResponse = kakaoAccountInfoClient.getAccessTokenForUserInfo( KAKAO_CONTENT_TYPE, AUTHORIZATION_HEADER_BEARER + kakaoTokenResponse.getAccessToken()); return accountSignInService.signIn(kakaoProfileResponse); }
accessToken
redirectURI
localhost
daily-receipt.com
따라서, 프론트가 로컬환경에서 로그인을 하기위해서 현재 시점에서 시도해볼 수 있는 세가지 방법을 생각해보았습니다.
이것 말고도 의견 있으시면 말씀해주세욥!
Description
프론트가 로컬 개발 환경에서 로그인 할 수 있게 하는 방법 찾기
https://github.com/EasyAndBeauty/DailyReceipt-BE-WEB/blob/main/src/main/java/com/sprint/dailyreceipt/infra/kakao/KakaoApi.java#L39
accessToken
을 요청하는 과정에서 redirectURI를 필요로합니다. 이redirectURI
는 로그인을 허용해준 URL을 뜻하므로, 만약 프론트가localhost
에서 로그인을 진행한다면redirectURI
도localhost
가 되어야하고, 프로덕션 서버에서 로그인을 해주었다면redirectURI
는daily-receipt.com
이 되어야합니다.따라서, 프론트가 로컬환경에서 로그인을 하기위해서 현재 시점에서 시도해볼 수 있는 세가지 방법을 생각해보았습니다.
이것 말고도 의견 있으시면 말씀해주세욥!