Skip to content

Commit

Permalink
[add] 주석 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hysong4u committed Apr 16, 2024
1 parent 90dc85f commit ef54abb
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,14 @@ public Long socialLogin(String code, String registrationId) {
String email = userResourceNode.get("email").asText();
String nickname = userResourceNode.get("name").asText();
String profileImage = userResourceNode.get("picture").asText();
System.out.println("Social ID: " + socialId);
System.out.println("Email: " + email);
System.out.println("Nickname: " + nickname);
System.out.println("Profile Image: " + profileImage);

UserInfoResponseDto user = saveMember(socialId, nickname, email, profileImage);
Long userId = user.id();
return userId;

}

// Oauth 토큰 가져오기
public String getOauthToken(String code) {
String tokenUri = "https://oauth2.googleapis.com/token";

Expand All @@ -81,6 +78,7 @@ public String getOauthToken(String code) {
}
}

// 유저 정보 가져오기
public JsonNode getUserResource(String accessToken) {
String apiUrl = "https://www.googleapis.com/oauth2/v2/userinfo";

Expand All @@ -105,6 +103,7 @@ public JsonNode getUserResource(String accessToken) {
return userResourceNode;
}

// 유저 저장
public UserInfoResponseDto saveMember(String socialId, String name, String email, String profileImage) {
User existMember = userRepository.findBySocialId(socialId);

Expand Down

0 comments on commit ef54abb

Please sign in to comment.