

250528 김혜민 oauth2 일반회원 로그인 구글추가
@2b084dd77e0952eb97eeb374790f5ab3e8fa99b6
--- src/main/java/com/takensoft/common/oauth/handler/OAuth2AuthenticationFailureHandler.java
+++ src/main/java/com/takensoft/common/oauth/handler/OAuth2AuthenticationFailureHandler.java
... | ... | @@ -50,6 +50,9 @@ |
50 | 50 |
private String mapErrorMessage(AuthenticationException exception) { |
51 | 51 |
String message = exception.getMessage(); |
52 | 52 |
|
53 |
+ if (message == null) { |
|
54 |
+ return "OAuth2 로그인에 실패했습니다."; |
|
55 |
+ } |
|
53 | 56 |
if (message.contains("access_denied")) { |
54 | 57 |
return "사용자가 인증을 취소했습니다."; |
55 | 58 |
} |
--- src/main/resources/application.yml
+++ src/main/resources/application.yml
... | ... | @@ -91,8 +91,8 @@ |
91 | 91 |
|
92 | 92 |
# 구글 OAuth2 설정 |
93 | 93 |
google: |
94 |
- client-id: ${GOOGLE_CLIENT_ID:AIzaSyB0FcOqHUlubnQzozH0G4fENpoq1pq3BxQ} |
|
95 |
- client-secret: ${GOOGLE_CLIENT_SECRET:your_google_client_secret_here} |
|
94 |
+ client-id: ${GOOGLE_CLIENT_ID:765599143887-79ga8lgcp83r1hg3s26eeidpubajokg9.apps.googleusercontent.com} |
|
95 |
+ client-secret: ${GOOGLE_CLIENT_SECRET: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} |
|
96 | 96 |
redirect-uri: ${GOOGLE_REDIRECT_URI:http://localhost:9090/login/oauth2/code/google} |
97 | 97 |
authorization-grant-type: authorization_code |
98 | 98 |
scope: profile,email |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?