Skip to content

Commit 449bde7

Browse files
authored
Merge pull request #187 from prgrms-web-devcourse-final-project/setting/prod-application-yml(WR9-110)
Setting/prod application yml(wr9 110)
2 parents e231d05 + b899e4f commit 449bde7

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/main/java/io/crops/warmletter/global/oauth/handler/OAuth2AuthenticationSuccessHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
4545
.httpOnly(true) // JavaScript에서 쿠키에 접근할 수 없도록 설정
4646
.secure(true) // HTTPS에서만 쿠키가 전송되도록 설정
4747
.sameSite("None") // 크로스 도메인 요청 허용
48-
.domain("13.209.132.150.nip.io")
48+
.domain("serverDomain")
4949
.path("/") // 쿠키가 유효한 경로 설정
5050
.maxAge(Duration.ofDays(14)) // 쿠키의 유효기간 설정 (14일)
5151
.build();

src/main/resources/application.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@ spring:
3737
google:
3838
client-id: ${GOOGLE_CLIENT_ID}
3939
client-secret: ${GOOGLE_CLIENT_SECRET}
40+
redirect-uri: "https://${PROD_SERVER_DOMAIN}/login/oauth2/code/google"
4041
scope: email
4142

4243
kakao:
4344
client-id: ${KAKAO_CLIENT_ID}
4445
client-secret: ${KAKAO_CLIENT_SECRET}
45-
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
46+
redirect-uri: "https://${PROD_SERVER_DOMAIN}/login/oauth2/code/kakao"
4647
authorization-grant-type: authorization_code
4748
client-authentication-method: client_secret_post
4849
client-name: Kakao
@@ -51,7 +52,7 @@ spring:
5152
naver:
5253
client-id: ${NAVER_CLIENT_ID}
5354
client-secret: ${NAVER_CLIENT_SECRET}
54-
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
55+
redirect-uri: "https://${PROD_SERVER_DOMAIN}/login/oauth2/code/naver"
5556
authorization-grant-type: authorization_code
5657
scope: email
5758
client-name: Naver
@@ -118,12 +119,13 @@ spring:
118119
google:
119120
client-id: ${GOOGLE_CLIENT_ID}
120121
client-secret: ${GOOGLE_CLIENT_SECRET}
122+
redirect-uri: "https://${SERVER_DOMAIN}/login/oauth2/code/google"
121123
scope: email
122124

123125
kakao:
124126
client-id: ${KAKAO_CLIENT_ID}
125127
client-secret: ${KAKAO_CLIENT_SECRET}
126-
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
128+
redirect-uri: "https://${SERVER_DOMAIN}/login/oauth2/code/kakao"
127129
authorization-grant-type: authorization_code
128130
client-authentication-method: client_secret_post
129131
client-name: Kakao
@@ -132,7 +134,7 @@ spring:
132134
naver:
133135
client-id: ${NAVER_CLIENT_ID}
134136
client-secret: ${NAVER_CLIENT_SECRET}
135-
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
137+
redirect-uri: "https://${SERVER_DOMAIN}/login/oauth2/code/naver"
136138
authorization-grant-type: authorization_code
137139
scope: email
138140
client-name: Naver

0 commit comments

Comments
 (0)