EasyAndBeauty / DailyReceipt-BE-WEB

4 stars 0 forks source link

[issue] 프론트가 로컬 개발환경에서 로그인을 어떻게 해야할까요? #32

Closed mdgarden closed 1 year ago

mdgarden commented 1 year ago

Description

프론트가 로컬 개발 환경에서 로그인 할 수 있게 하는 방법 찾기

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);
    }

따라서, 프론트가 로컬환경에서 로그인을 하기위해서 현재 시점에서 시도해볼 수 있는 세가지 방법을 생각해보았습니다.

이것 말고도 의견 있으시면 말씀해주세욥!