Skip to content

Commit

Permalink
Merge pull request #86 from yomankum-project/develop-hotfix
Browse files Browse the repository at this point in the history
Develop hotfix
  • Loading branch information
hyungzin0309 authored Jun 19, 2024
2 parents 5c0988b + 865b229 commit f8f7428
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.account.yomankum.auth.oauth.controller;

import com.account.yomankum.auth.local.dto.response.LoginResponse;
import com.account.yomankum.auth.oauth.dto.OauthLoginRequest;
import com.account.yomankum.auth.oauth.dto.OauthSignupRequest;
import com.account.yomankum.auth.oauth.service.OauthService;
import com.account.yomankum.user.domain.AuthType;
Expand Down Expand Up @@ -31,8 +32,8 @@ public ResponseEntity<Void> redirectToOauthCodeRequestPage(@PathVariable AuthTyp

@PostMapping("/login")
@Operation(summary = "oauth 로그인")
public LoginResponse login(AuthType type, String code){
return oauthService.login(type, code);
public LoginResponse login(@RequestBody OauthLoginRequest loginRequest){
return oauthService.login(loginRequest.type(), loginRequest.code());
}

@PostMapping("/signup")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.account.yomankum.auth.oauth.dto;

import com.account.yomankum.user.domain.AuthType;

public record OauthLoginRequest(
AuthType type,
String code
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ public class KakaoAuthConfig {
private String authorizationGrantType;
private String clientAuthenticationMethod;

private String authorizationUri; // code요청 url
}
4 changes: 2 additions & 2 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ oauth:
- email
kakao:
client_id: ${KAKAO_CLIENT_ID}
client_secret: ${KAKAO_CLIENT_ID}
redirect_uri: http://localhost:5173/oauth/redirect/kakao
client_secret: ${KAKAO_CLIENT_SECRET}
redirect_uri: http://localhost:5173/oauth2/redirect
authorization_grant_type: authorization_code
client_authentication_method: client_secret_post
scope:
Expand Down

0 comments on commit f8f7428

Please sign in to comment.