Skip to content

Commit

Permalink
Merge pull request #47 from YAPP-Github/feature/MAFOO-25
Browse files Browse the repository at this point in the history
[MAFOO-25] feat: 카카오 로그인 Redirect URL 고도화
  • Loading branch information
CChuYong authored Jul 25, 2024
2 parents 0508c7f + 17cf408 commit 77e2ded
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class AuthController implements AuthApi {
@Override
public Mono<LoginResponse> loginWithKakao(KakaoLoginRequest request) {
return authService
.loginWithKakao(request.code())
.loginWithKakao(request.accessToken())
.map(authToken -> new LoginResponse(authToken.accessToken(), authToken.refreshToken()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@Schema(description = "카카오 로그인 요청")
public record KakaoLoginRequest(
@Schema(description = "인가 코드", example = "test")
String code
@Schema(description = "카카오 엑세스 토큰", example = "test")
String accessToken
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ public class AuthService {
private final AppleOAuthProperties appleOAuthProperties;
private final ObjectMapper objectMapper;


@Transactional
public Mono<AuthToken> loginWithKakao(String code) {
return getKakaoTokenWithCode(code)
.flatMap(this::getUserInfoWithKakaoToken)
public Mono<AuthToken> loginWithKakao(String kakaoAccessToken) {
return getUserInfoWithKakaoToken(kakaoAccessToken)
.flatMap(kakaoLoginInfo -> getOrCreateMember(
IdentityProvider.KAKAO,
kakaoLoginInfo.id(),
Expand Down

0 comments on commit 77e2ded

Please sign in to comment.