Compare commits

..

6 Commits

Author SHA1 Message Date
kjh2064 f216660afa fix(portal): skip unconfigured oauth providers
TaxBaik CI/CD / build-and-deploy (push) Successful in 53s
2026-06-28 19:29:54 +09:00
kjh2064 b31b43e30e fix(ci): repair deploy workflow yaml
TaxBaik CI/CD / build-and-deploy (push) Failing after 1m45s
2026-06-28 19:25:40 +09:00
kjh2064 86bd9ef8ff chore(ci): allow manual deploy dispatch 2026-06-28 19:13:35 +09:00
kjh2064 2fd9984a45 chore(ci): trigger deploy after verification 2026-06-28 18:55:29 +09:00
kjh2064 91330ec94c chore(ci): trigger deploy with real push 2026-06-28 18:50:11 +09:00
kjh2064 08102c8684 chore(ci): deploy trigger 2026-06-28 18:42:55 +09:00
4 changed files with 91 additions and 69 deletions
+1
View File
@@ -9,3 +9,4 @@ Authentication__Naver__ClientId=
Authentication__Naver__ClientSecret= Authentication__Naver__ClientSecret=
Authentication__Kakao__ClientId= Authentication__Kakao__ClientId=
Authentication__Kakao__ClientSecret= Authentication__Kakao__ClientSecret=
# CI deploy trigger requires a real push on master.
+1
View File
@@ -1,6 +1,7 @@
name: TaxBaik CI/CD name: TaxBaik CI/CD
on: on:
workflow_dispatch:
push: push:
branches: branches:
- master - master
+2
View File
@@ -2,6 +2,8 @@
**온라인 세무 상담 플랫폼** | 블로그 SEO 최적화 | 전국 고객 확보 **온라인 세무 상담 플랫폼** | 블로그 SEO 최적화 | 전국 고객 확보
CI deploy trigger verification note.
--- ---
## 개요 ## 개요
+31 -13
View File
@@ -64,7 +64,7 @@ if (isProduction && jwtKey.Contains("dev-secret", StringComparison.OrdinalIgnore
throw new InvalidOperationException("Production JWT SecretKey must not use the development default."); throw new InvalidOperationException("Production JWT SecretKey must not use the development default.");
var key = Encoding.ASCII.GetBytes(jwtKey); var key = Encoding.ASCII.GetBytes(jwtKey);
builder.Services.AddAuthentication(opts => var authenticationBuilder = builder.Services.AddAuthentication(opts =>
{ {
opts.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; opts.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
opts.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; opts.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
@@ -100,19 +100,30 @@ 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;
}) });
.AddGoogle(PortalOAuthDefaults.GoogleScheme, opts =>
var googleClientId = builder.Configuration["Authentication:Google:ClientId"];
var googleClientSecret = builder.Configuration["Authentication:Google:ClientSecret"];
if (!string.IsNullOrWhiteSpace(googleClientId) && !string.IsNullOrWhiteSpace(googleClientSecret))
{
authenticationBuilder.AddGoogle(PortalOAuthDefaults.GoogleScheme, opts =>
{ {
opts.SignInScheme = PortalOAuthDefaults.ExternalScheme; opts.SignInScheme = PortalOAuthDefaults.ExternalScheme;
opts.ClientId = builder.Configuration["Authentication:Google:ClientId"] ?? ""; opts.ClientId = googleClientId;
opts.ClientSecret = builder.Configuration["Authentication:Google:ClientSecret"] ?? ""; opts.ClientSecret = googleClientSecret;
opts.CallbackPath = "/taxbaik/portal/signin-google"; opts.CallbackPath = "/taxbaik/portal/signin-google";
}) });
.AddOAuth(PortalOAuthDefaults.NaverScheme, opts => }
var naverClientId = builder.Configuration["Authentication:Naver:ClientId"];
var naverClientSecret = builder.Configuration["Authentication:Naver:ClientSecret"];
if (!string.IsNullOrWhiteSpace(naverClientId) && !string.IsNullOrWhiteSpace(naverClientSecret))
{
authenticationBuilder.AddOAuth(PortalOAuthDefaults.NaverScheme, opts =>
{ {
opts.SignInScheme = PortalOAuthDefaults.ExternalScheme; opts.SignInScheme = PortalOAuthDefaults.ExternalScheme;
opts.ClientId = builder.Configuration["Authentication:Naver:ClientId"] ?? ""; opts.ClientId = naverClientId;
opts.ClientSecret = builder.Configuration["Authentication:Naver:ClientSecret"] ?? ""; opts.ClientSecret = naverClientSecret;
opts.CallbackPath = "/taxbaik/portal/signin-naver"; opts.CallbackPath = "/taxbaik/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";
@@ -133,12 +144,18 @@ builder.Services.AddAuthentication(opts =>
context.Identity?.AddClaim(new System.Security.Claims.Claim(System.Security.Claims.ClaimTypes.Email, responseRoot.GetProperty("email").GetString() ?? "")); context.Identity?.AddClaim(new System.Security.Claims.Claim(System.Security.Claims.ClaimTypes.Email, responseRoot.GetProperty("email").GetString() ?? ""));
} }
}; };
}) });
.AddOAuth(PortalOAuthDefaults.KakaoScheme, opts => }
var kakaoClientId = builder.Configuration["Authentication:Kakao:ClientId"];
var kakaoClientSecret = builder.Configuration["Authentication:Kakao:ClientSecret"];
if (!string.IsNullOrWhiteSpace(kakaoClientId) && !string.IsNullOrWhiteSpace(kakaoClientSecret))
{
authenticationBuilder.AddOAuth(PortalOAuthDefaults.KakaoScheme, opts =>
{ {
opts.SignInScheme = PortalOAuthDefaults.ExternalScheme; opts.SignInScheme = PortalOAuthDefaults.ExternalScheme;
opts.ClientId = builder.Configuration["Authentication:Kakao:ClientId"] ?? ""; opts.ClientId = kakaoClientId;
opts.ClientSecret = builder.Configuration["Authentication:Kakao:ClientSecret"] ?? ""; opts.ClientSecret = kakaoClientSecret;
opts.CallbackPath = "/taxbaik/portal/signin-kakao"; opts.CallbackPath = "/taxbaik/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";
@@ -162,6 +179,7 @@ builder.Services.AddAuthentication(opts =>
} }
}; };
}); });
}
// Blazor 인증 // Blazor 인증
builder.Services.AddScoped<AuthService>(); builder.Services.AddScoped<AuthService>();