Skip to content

Commit

Permalink
fix: 소셜 로그인 성공 시 쿠키 전달 값(isLoggedIn) 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
tjdtn0219 committed Jan 26, 2024
1 parent 579004d commit 4b24961
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ public static void storeLoginResponse(
setValueInCookie(response, "provider", String.valueOf(member.getProviderType()));
}

public static void storeSocialLoginResponse(
HttpServletResponse response,
TokenIssueResponse tokenIssue,
Member member
) {
setValueInCookie(response, "isLoggedIn", "yes");
storeLoginResponse(response, tokenIssue, member);
}

public static void storeOauth2Attribute(
HttpServletResponse response,
String email, String provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public void loginOauth(
.generateTokenInfo(loginRequest.email(), ROLE_USER.name(), providerType.name());
}
Member member = memberRepository.getMember(loginRequest.email(), providerType);
CookieCreator.storeLoginResponse(response, tokenIssue, member);
CookieCreator.storeSocialLoginResponse(response, tokenIssue, member);
}

@Transactional
Expand Down

0 comments on commit 4b24961

Please sign in to comment.