Skip to content

Commit

Permalink
πŸš€ :: Api-v0.0.3-9
Browse files Browse the repository at this point in the history
πŸš€ :: Api-v0.0.3-9
  • Loading branch information
ImNM authored Jan 15, 2023
2 parents 1f10940 + 4a68bbe commit 4c104d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ public OauthLoginLinkResponse getKakaoOauthLink(
log.info("/oauth/kakao" + host);
String format = String.format("https://%s/", host);
if (referer.contains("admin")) {
// ν”„λ‘ νŠΈ κ°œλ°œμžκ°€ λ‘œμ»¬μ—μ„œ 개발 ν…ŒμŠ€νŠΈ ν•  λ•Œ ν•΄λ‹Ή https://두λ‘₯.com/admin
return registerUseCase.getKaKaoOauthLink(format + "/admin");
// ν”„λ‘ νŠΈ κ°œλ°œμžκ°€ λ‘œμ»¬μ—μ„œ 개발 ν…ŒμŠ€νŠΈ ν•  λ•Œ ν•΄λ‹Ή https://두λ‘₯.com/admin/
return registerUseCase.getKaKaoOauthLink(format + "admin");
}
return registerUseCase.getKaKaoOauthLink(format);
} else if (referer.contains("5173")) {
// ν”„λ‘ νŠΈ κ°œλ°œμžκ°€ λ‘œμ»¬μ—μ„œ 개발 ν…ŒμŠ€νŠΈ ν•  λ•Œ ν•΄λ‹Ή https://localhost:5173/
return registerUseCase.getKaKaoOauthLink(referer + "/admin");
// ν”„λ‘ νŠΈ κ°œλ°œμžκ°€ λ‘œμ»¬μ—μ„œ 개발 ν…ŒμŠ€νŠΈ ν•  λ•Œ ν•΄λ‹Ή https://localhost:5173/admin/
return registerUseCase.getKaKaoOauthLink(referer + "admin");
}
// ν”„λ‘ νŠΈ κ°œλ°œμžκ°€ λ‘œμ»¬μ—μ„œ 개발 ν…ŒμŠ€νŠΈ ν•  λ•Œ ν•΄λ‹Ή https://localhost:3000/
return registerUseCase.getKaKaoOauthLink(referer);
Expand All @@ -93,11 +93,11 @@ public OauthTokenResponse getCredentialFromKaKao(
log.info("/oauth/kakao" + host);
String format = String.format("https://%s/", host);
if (referer.contains("admin")) {
return registerUseCase.getCredentialFromKaKao(code, format + "/admin");
return registerUseCase.getCredentialFromKaKao(code, format + "admin");
}
return registerUseCase.getCredentialFromKaKao(code, format);
} else if (referer.contains("5173")) {
return registerUseCase.getCredentialFromKaKao(code, referer + "/admin");
return registerUseCase.getCredentialFromKaKao(code, referer + "admin");
}
return registerUseCase.getCredentialFromKaKao(code, referer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public String getKaKaoOauthLink(String referer) {
+ String.format(
KAKAO_OAUTH_QUERY_STRING,
oauthProperties.getKakaoClientId(),
referer + "kakao/callback");
referer + "/kakao/callback");
}

public KakaoTokenResponse getOauthToken(String code, String referer) {

return kakaoOauthClient.kakaoAuth(
oauthProperties.getKakaoClientId(),
referer + "kakao/callback",
referer + "/kakao/callback",
code,
oauthProperties.getKakaoClientSecret());
}
Expand Down

0 comments on commit 4c104d5

Please sign in to comment.