Skip to content

Commit

Permalink
feat: 리다이렉트 주소 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jschoi-96 committed Dec 13, 2024
1 parent 4be3d89 commit c44a316
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public class CustomOAuth2UserService extends DefaultOAuth2UserService {
@Value("${spring.security.security.oauth2-password}")
private String oauth2Password;

@Value("${urls.firstLoggedIn}")
private String firstLoggedInUrl;
@Value("${urls.firstRegister}")
private String firstRegisterUrl;

@Value("${urls.alreadyLoggedIn}")
private String alreadyLoggedInUrl;
@Value("${urls.alreadyRegistered}")
private String alreadyRegisteredUrl;

private final MemberRepository memberRepository;

Expand Down Expand Up @@ -64,7 +64,7 @@ public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2Authentic

Member newMember = oauth2Dto.toEntity();
memberRepository.save(newMember);
return new CustomOAuth2User(oauth2Dto, firstLoggedInUrl);
return new CustomOAuth2User(oauth2Dto, firstRegisterUrl);
}

else { // 회원이 존재할 떄
Expand All @@ -73,7 +73,7 @@ public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2Authentic
.email(findMember.getEmail())
.role(findMember.getRole())
.build();
return new CustomOAuth2User(oauth2Dto, alreadyLoggedInUrl);
return new CustomOAuth2User(oauth2Dto, alreadyRegisteredUrl);
}
}

Expand Down

0 comments on commit c44a316

Please sign in to comment.