diff --git a/server/src/main/java/com/yogit/server/applelogin/controller/AppleController.java b/server/src/main/java/com/yogit/server/applelogin/controller/AppleController.java index d988903..cfaeead 100644 --- a/server/src/main/java/com/yogit/server/applelogin/controller/AppleController.java +++ b/server/src/main/java/com/yogit/server/applelogin/controller/AppleController.java @@ -90,32 +90,32 @@ public TokenResponse servicesRedirect(ServicesResponse serviceResponse) throws N return appleService.requestCodeValidations(client_secret, code, null); } -// /** -// * Apple Login 유저 정보를 받은 후 권한 생성 -// * privateKey 로 사용자 개인 정보와 refreshToken 발급받기 -// * @param serviceResponse -// * @return -// */ -// @PostMapping(value = "/redirectios") -// @ResponseBody -// public TokenResponse servicesRedirectIos(ServicesResponse serviceResponse) throws NoSuchAlgorithmException { -// -// if (serviceResponse == null) { -// return null; -// } -// -// String code = serviceResponse.getCode(); -// String id_token = serviceResponse.getId_token(); -// String client_secret = appleService.getAppleClientSecret(serviceResponse.getId_token()); -// -// logger.debug("================================"); -// logger.debug("id_token ‣ " + serviceResponse.getId_token()); -// logger.debug("payload ‣ " + appleService.getPayload(serviceResponse.getId_token())); -// logger.debug("client_secret ‣ " + client_secret); -// logger.debug("================================"); -// -// return appleService.requestCodeValidations(client_secret, code, null); -// } + /** + * Apple Login 유저 정보를 받은 후 권한 생성 + * privateKey 로 사용자 개인 정보와 refreshToken 발급받기 + * @param serviceResponse + * @return + */ + @PostMapping(value = "/redirectios") + @ResponseBody + public TokenResponse servicesRedirectIos(ServicesResponse serviceResponse) throws NoSuchAlgorithmException { + + if (serviceResponse == null) { + return null; + } + + String code = serviceResponse.getCode(); + String id_token = serviceResponse.getId_token(); + String client_secret = appleService.getAppleClientSecret(serviceResponse.getId_token()); + + logger.debug("================================"); + logger.debug("id_token ‣ " + serviceResponse.getId_token()); + logger.debug("payload ‣ " + appleService.getPayload(serviceResponse.getId_token())); + logger.debug("client_secret ‣ " + client_secret); + logger.debug("================================"); + + return appleService.requestCodeValidations(client_secret, code, null); + } /** * refresh_token 유효성 검사 diff --git a/server/src/main/resources/application.properties b/server/src/main/resources/application.properties index 8d38f75..f1fed71 100644 --- a/server/src/main/resources/application.properties +++ b/server/src/main/resources/application.properties @@ -6,9 +6,9 @@ APPLE.PUBLICKEY.URL=https://appleid.apple.com/auth/keys APPLE.WEBSITE.URL=https://yogit.world/redirect APPLE.ISS=https://appleid.apple.com # client_ID (Web 구현 용) -APPLE.AUD=com.Branch.service +#APPLE.AUD=com.Branch.service # client_ID (IOS 구현 용) -#APPLE.AUD=com.Branch.Yogit +APPLE.AUD=com.Branch.Yogit #Team_ID APPLE.TEAM.ID=9487SKDZZB # key_ID