Skip to content

Commit f5a5380

Browse files
committed
[#125]; fix: redirect path 변경
redirect path는 oauth2가 아니라 oauth
1 parent 94819b1 commit f5a5380

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/kotlin/com/yourssu/scouter/common/implement/support/security/oauth2/GoogleOAuth2Properties.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ data class GoogleOAuth2Properties(
77
val clientId: String,
88
val clientSecret: String,
99
// 기존 path는 널 허용 + 기본값 제공
10-
var redirectPath: String? = "/oauth2/callback/google",
10+
var redirectPath: String? = "/oauth/callback/google",
1111
var allowedRedirectUris: List<String>? = null,
1212
val scope: List<String>
1313
) {
1414

1515
fun calculateRedirectUri(baseUrl: String? = null): String {
1616
// referer 등으로 들어온 baseUrl에서 오리진만 추출해 안전하게 붙임
1717
val origin = extractOrigin(baseUrl ?: "http://localhost:5173")
18-
val path = (redirectPath ?: "/oauth2/callback/google").let { p -> if (p.startsWith("/")) p else "/$p" }
18+
val path = (redirectPath ?: "/oauth/callback/google").let { p -> if (p.startsWith("/")) p else "/$p" }
1919
return origin.removeSuffix("/") + path
2020
}
2121

src/main/resources/application-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ oauth2:
2626
google:
2727
client_id: ${GOOGLE_OAUTH_CLIENT_ID} # 환경변수에서 주입
2828
client_secret: ${GOOGLE_OAUTH_CLIENT_SECRET} # 환경변수에서 주입
29-
redirect-path: /oauth2/callback/google
29+
redirect-path: /oauth/callback/google
3030
allowed_redirect_uris:
3131
- ${ALLOWED_REDIRECT_URI_LOCAL}
3232
- ${ALLOWED_REDIRECT_URI_DEV}

src/main/resources/application-local.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ oauth2:
3434
google:
3535
client_id: ${GOOGLE_OAUTH_CLIENT_ID} # 환경변수에서 주입
3636
client_secret: ${GOOGLE_OAUTH_CLIENT_SECRET} # 환경변수에서 주입
37-
redirect-path: /oauth2/callback/google
37+
redirect-path: /oauth/callback/google
3838
allowed_redirect_uris:
3939
- ${ALLOWED_REDIRECT_URI_LOCAL}
4040
- ${ALLOWED_REDIRECT_URI_DEV}

0 commit comments

Comments
 (0)