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

[fix]: 소셜 정보 조회 이름 조회 -> 닉네임 조회로 수정 #52

Merged
merged 2 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public class LoginController {

@Value("${kakao.redirect-uri}")
private String redirectUri;
@Value("${kakao.client-id}")
private String kakaoClientId;



Expand All @@ -54,7 +56,7 @@ public class LoginController {
public String login(){
String toRedirectUri = UriComponentsBuilder.fromUriString("https://kauth.kakao.com/oauth/authorize")
.queryParam("response_type", "code")
.queryParam("client_id", "32c0787d1b1e9fcabcc24af247903ba8")
.queryParam("client_id", kakaoClientId)
.queryParam("redirect_uri", redirectUri)
.toUriString();
return "redirect:" + toRedirectUri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static class TokenValidateResponseDTO{
@ToString
public static class UserInfoResponseDTO{
private String sub;
private String name;
private String nickname;
private String email;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static User toUser(KakaoOauth2DTO.UserInfoResponseDTO response){
return User.builder()
.oauthId(response.getSub())
.email(response.getEmail())
.name(response.getName())
.name(response.getNickname())
.socialType(SocialType.KAKAO)
.build();
}
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
spring:
cloud:
openfeign:
client:
config:
default:
logger-level: FULL
profiles:
active: dev
jwt:
Expand Down
Loading