fix: UsePathBase 미들웨어와 중복되는 '/taxbaik' 하드코딩 경로 접두사 제거 (PR #4 보완)
This commit is contained in:
@@ -52,5 +52,5 @@ public class LoginModel : PageModel
|
|||||||
public IActionResult OnPostKakao() => Challenge(BuildProps("kakao"), PortalOAuthDefaults.KakaoScheme);
|
public IActionResult OnPostKakao() => Challenge(BuildProps("kakao"), PortalOAuthDefaults.KakaoScheme);
|
||||||
|
|
||||||
private static AuthenticationProperties BuildProps(string provider) =>
|
private static AuthenticationProperties BuildProps(string provider) =>
|
||||||
new() { RedirectUri = $"/taxbaik/portal/external-callback?provider={provider}" };
|
new() { RedirectUri = $"/portal/external-callback?provider={provider}" };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ var authenticationBuilder = builder.Services.AddAuthentication(opts =>
|
|||||||
opts.Cookie.HttpOnly = true;
|
opts.Cookie.HttpOnly = true;
|
||||||
opts.Cookie.SameSite = SameSiteMode.Lax;
|
opts.Cookie.SameSite = SameSiteMode.Lax;
|
||||||
opts.Cookie.SecurePolicy = isProduction ? CookieSecurePolicy.Always : CookieSecurePolicy.SameAsRequest;
|
opts.Cookie.SecurePolicy = isProduction ? CookieSecurePolicy.Always : CookieSecurePolicy.SameAsRequest;
|
||||||
opts.LoginPath = "/taxbaik/portal/login";
|
opts.LoginPath = "/portal/login";
|
||||||
opts.AccessDeniedPath = "/taxbaik/portal/login";
|
opts.AccessDeniedPath = "/portal/login";
|
||||||
opts.SlidingExpiration = true;
|
opts.SlidingExpiration = true;
|
||||||
opts.ExpireTimeSpan = TimeSpan.FromDays(7);
|
opts.ExpireTimeSpan = TimeSpan.FromDays(7);
|
||||||
})
|
})
|
||||||
@@ -111,7 +111,7 @@ if (!string.IsNullOrWhiteSpace(googleClientId) && !string.IsNullOrWhiteSpace(goo
|
|||||||
opts.SignInScheme = PortalOAuthDefaults.ExternalScheme;
|
opts.SignInScheme = PortalOAuthDefaults.ExternalScheme;
|
||||||
opts.ClientId = googleClientId;
|
opts.ClientId = googleClientId;
|
||||||
opts.ClientSecret = googleClientSecret;
|
opts.ClientSecret = googleClientSecret;
|
||||||
opts.CallbackPath = "/taxbaik/portal/signin-google";
|
opts.CallbackPath = "/portal/signin-google";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ if (!string.IsNullOrWhiteSpace(naverClientId) && !string.IsNullOrWhiteSpace(nave
|
|||||||
opts.SignInScheme = PortalOAuthDefaults.ExternalScheme;
|
opts.SignInScheme = PortalOAuthDefaults.ExternalScheme;
|
||||||
opts.ClientId = naverClientId;
|
opts.ClientId = naverClientId;
|
||||||
opts.ClientSecret = naverClientSecret;
|
opts.ClientSecret = naverClientSecret;
|
||||||
opts.CallbackPath = "/taxbaik/portal/signin-naver";
|
opts.CallbackPath = "/portal/signin-naver";
|
||||||
opts.AuthorizationEndpoint = "https://nid.naver.com/oauth2.0/authorize";
|
opts.AuthorizationEndpoint = "https://nid.naver.com/oauth2.0/authorize";
|
||||||
opts.TokenEndpoint = "https://nid.naver.com/oauth2.0/token";
|
opts.TokenEndpoint = "https://nid.naver.com/oauth2.0/token";
|
||||||
opts.UserInformationEndpoint = "https://openapi.naver.com/v1/nid/me";
|
opts.UserInformationEndpoint = "https://openapi.naver.com/v1/nid/me";
|
||||||
@@ -156,7 +156,7 @@ if (!string.IsNullOrWhiteSpace(kakaoClientId) && !string.IsNullOrWhiteSpace(kaka
|
|||||||
opts.SignInScheme = PortalOAuthDefaults.ExternalScheme;
|
opts.SignInScheme = PortalOAuthDefaults.ExternalScheme;
|
||||||
opts.ClientId = kakaoClientId;
|
opts.ClientId = kakaoClientId;
|
||||||
opts.ClientSecret = kakaoClientSecret;
|
opts.ClientSecret = kakaoClientSecret;
|
||||||
opts.CallbackPath = "/taxbaik/portal/signin-kakao";
|
opts.CallbackPath = "/portal/signin-kakao";
|
||||||
opts.AuthorizationEndpoint = "https://kauth.kakao.com/oauth/authorize";
|
opts.AuthorizationEndpoint = "https://kauth.kakao.com/oauth/authorize";
|
||||||
opts.TokenEndpoint = "https://kauth.kakao.com/oauth/token";
|
opts.TokenEndpoint = "https://kauth.kakao.com/oauth/token";
|
||||||
opts.UserInformationEndpoint = "https://kapi.kakao.com/v2/user/me";
|
opts.UserInformationEndpoint = "https://kapi.kakao.com/v2/user/me";
|
||||||
|
|||||||
Reference in New Issue
Block a user