Files
taxbaik/legacy/smartadmin/img/logo.svg
T
kjh2064 40cffb3beb
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m26s
fix: implement Blazor-native login form to properly update authentication state
Problem: JavaScript login form saved tokens to localStorage but didn't notify
CustomAuthenticationStateProvider, causing [Authorize] pages to remain in
'loading' state indefinitely. The provider only reads tokens when:
1. GetAuthenticationStateAsync() is called (page load)
2. NotifyAuthenticationStateChanged() is triggered (UI updates)

But JavaScript login didn't trigger either, leaving the authentication state
stale.

Solution: Convert AdminLoginForm from HTML+JavaScript to pure Blazor component.
Now the login flow is:
1. User enters credentials in Blazor form
2. HttpClient POST to /api/auth/login
3. Save tokens to localStorage
4. Call CustomAuthenticationStateProvider.LoginAsync() directly
5. Blazor detects auth state change and re-evaluates [Authorize] pages
6. Dashboard [Authorize] page renders successfully

Result: Immediate authentication state update, no loading timeout on protected pages.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-03 13:03:53 +09:00

34 lines
8.4 KiB
XML

<svg width="176" height="32" viewBox="0 0 176 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M50.5733 23.14C49.5466 23.14 48.6266 22.9733 47.8133 22.64C47 22.3067 46.3466 21.8133 45.8533 21.16C45.3733 20.5067 45.12 19.72 45.0933 18.8H48.7333C48.7866 19.32 48.9666 19.72 49.2733 20C49.58 20.2667 49.98 20.4 50.4733 20.4C50.98 20.4 51.38 20.2867 51.6733 20.06C51.9666 19.82 52.1133 19.4933 52.1133 19.08C52.1133 18.7333 51.9933 18.4467 51.7533 18.22C51.5266 17.9933 51.24 17.8067 50.8933 17.66C50.56 17.5133 50.08 17.3467 49.4533 17.16C48.5466 16.88 47.8066 16.6 47.2333 16.32C46.66 16.04 46.1666 15.6267 45.7533 15.08C45.34 14.5333 45.1333 13.82 45.1333 12.94C45.1333 11.6333 45.6066 10.6133 46.5533 9.88001C47.5 9.13335 48.7333 8.76001 50.2533 8.76001C51.8 8.76001 53.0466 9.13335 53.9933 9.88001C54.94 10.6133 55.4466 11.64 55.5133 12.96H51.8133C51.7866 12.5067 51.62 12.1533 51.3133 11.9C51.0066 11.6333 50.6133 11.5 50.1333 11.5C49.72 11.5 49.3866 11.6133 49.1333 11.84C48.88 12.0533 48.7533 12.3667 48.7533 12.78C48.7533 13.2333 48.9666 13.5867 49.3933 13.84C49.82 14.0933 50.4866 14.3667 51.3933 14.66C52.3 14.9667 53.0333 15.26 53.5933 15.54C54.1666 15.82 54.66 16.2267 55.0733 16.76C55.4866 17.2933 55.6933 17.98 55.6933 18.82C55.6933 19.62 55.4866 20.3467 55.0733 21C54.6733 21.6533 54.0866 22.1733 53.3133 22.56C52.54 22.9467 51.6266 23.14 50.5733 23.14Z" fill="#474747"/>
<path d="M72.038 11.72C73.4246 11.72 74.5246 12.14 75.338 12.98C76.1646 13.82 76.578 14.9867 76.578 16.48V23H73.178V16.94C73.178 16.22 72.9846 15.6667 72.598 15.28C72.2246 14.88 71.7046 14.68 71.038 14.68C70.3713 14.68 69.8446 14.88 69.458 15.28C69.0846 15.6667 68.898 16.22 68.898 16.94V23H65.498V16.94C65.498 16.22 65.3046 15.6667 64.918 15.28C64.5446 14.88 64.0246 14.68 63.358 14.68C62.6913 14.68 62.1646 14.88 61.778 15.28C61.4046 15.6667 61.218 16.22 61.218 16.94V23H57.798V11.84H61.218V13.24C61.5646 12.7733 62.018 12.4067 62.578 12.14C63.138 11.86 63.7713 11.72 64.478 11.72C65.318 11.72 66.0646 11.9 66.718 12.26C67.3846 12.62 67.9046 13.1333 68.278 13.8C68.6646 13.1867 69.1913 12.6867 69.858 12.3C70.5246 11.9133 71.2513 11.72 72.038 11.72Z" fill="#474747"/>
<path d="M78.2899 17.4C78.2899 16.2533 78.5032 15.2467 78.9299 14.38C79.3699 13.5133 79.9632 12.8467 80.7099 12.38C81.4565 11.9133 82.2899 11.68 83.2099 11.68C83.9965 11.68 84.6832 11.84 85.2699 12.16C85.8699 12.48 86.3299 12.9 86.6499 13.42V11.84H90.0699V23H86.6499V21.42C86.3165 21.94 85.8499 22.36 85.2499 22.68C84.6632 23 83.9765 23.16 83.1899 23.16C82.2832 23.16 81.4565 22.9267 80.7099 22.46C79.9632 21.98 79.3699 21.3067 78.9299 20.44C78.5032 19.56 78.2899 18.5467 78.2899 17.4ZM86.6499 17.42C86.6499 16.5667 86.4099 15.8933 85.9299 15.4C85.4632 14.9067 84.8899 14.66 84.2099 14.66C83.5299 14.66 82.9499 14.9067 82.4699 15.4C82.0032 15.88 81.7699 16.5467 81.7699 17.4C81.7699 18.2533 82.0032 18.9333 82.4699 19.44C82.9499 19.9333 83.5299 20.18 84.2099 20.18C84.8899 20.18 85.4632 19.9333 85.9299 19.44C86.4099 18.9467 86.6499 18.2733 86.6499 17.42Z" fill="#474747"/>
<path d="M95.9641 13.7C96.3641 13.0867 96.8641 12.6067 97.4641 12.26C98.0641 11.9 98.7307 11.72 99.4641 11.72V15.34H98.5241C97.6707 15.34 97.0307 15.5267 96.6041 15.9C96.1774 16.26 95.9641 16.9 95.9641 17.82V23H92.5441V11.84H95.9641V13.7Z" fill="#474747"/>
<path d="M107.319 20.1V23H105.579C104.339 23 103.372 22.7 102.679 22.1C101.985 21.4867 101.639 20.4933 101.639 19.12V14.68H100.279V11.84H101.639V9.12001H105.059V11.84H107.299V14.68H105.059V19.16C105.059 19.4933 105.139 19.7333 105.299 19.88C105.459 20.0267 105.725 20.1 106.099 20.1H107.319Z" fill="#474747"/>
<path d="M117.964 20.52H112.724L111.884 23H108.304L113.384 8.96001H117.344L122.424 23H118.804L117.964 20.52ZM117.084 17.88L115.344 12.74L113.624 17.88H117.084Z" fill="#474747"/>
<path d="M123.29 17.4C123.29 16.2533 123.503 15.2467 123.93 14.38C124.37 13.5133 124.963 12.8467 125.71 12.38C126.457 11.9133 127.29 11.68 128.21 11.68C128.943 11.68 129.61 11.8333 130.21 12.14C130.823 12.4467 131.303 12.86 131.65 13.38V8.20001H135.07V23H131.65V21.4C131.33 21.9333 130.87 22.36 130.27 22.68C129.683 23 128.997 23.16 128.21 23.16C127.29 23.16 126.457 22.9267 125.71 22.46C124.963 21.98 124.37 21.3067 123.93 20.44C123.503 19.56 123.29 18.5467 123.29 17.4ZM131.65 17.42C131.65 16.5667 131.41 15.8933 130.93 15.4C130.463 14.9067 129.89 14.66 129.21 14.66C128.53 14.66 127.95 14.9067 127.47 15.4C127.003 15.88 126.77 16.5467 126.77 17.4C126.77 18.2533 127.003 18.9333 127.47 19.44C127.95 19.9333 128.53 20.18 129.21 20.18C129.89 20.18 130.463 19.9333 130.93 19.44C131.41 18.9467 131.65 18.2733 131.65 17.42Z" fill="#474747"/>
<path d="M151.784 11.72C153.171 11.72 154.271 12.14 155.084 12.98C155.911 13.82 156.324 14.9867 156.324 16.48V23H152.924V16.94C152.924 16.22 152.731 15.6667 152.344 15.28C151.971 14.88 151.451 14.68 150.784 14.68C150.117 14.68 149.591 14.88 149.204 15.28C148.831 15.6667 148.644 16.22 148.644 16.94V23H145.244V16.94C145.244 16.22 145.051 15.6667 144.664 15.28C144.291 14.88 143.771 14.68 143.104 14.68C142.437 14.68 141.911 14.88 141.524 15.28C141.151 15.6667 140.964 16.22 140.964 16.94V23H137.544V11.84H140.964V13.24C141.311 12.7733 141.764 12.4067 142.324 12.14C142.884 11.86 143.517 11.72 144.224 11.72C145.064 11.72 145.811 11.9 146.464 12.26C147.131 12.62 147.651 13.1333 148.024 13.8C148.411 13.1867 148.937 12.6867 149.604 12.3C150.271 11.9133 150.997 11.72 151.784 11.72Z" fill="#474747"/>
<path d="M160.436 10.68C159.836 10.68 159.343 10.5067 158.956 10.16C158.583 9.80001 158.396 9.36001 158.396 8.84001C158.396 8.30668 158.583 7.86668 158.956 7.52001C159.343 7.16001 159.836 6.98001 160.436 6.98001C161.023 6.98001 161.503 7.16001 161.876 7.52001C162.263 7.86668 162.456 8.30668 162.456 8.84001C162.456 9.36001 162.263 9.80001 161.876 10.16C161.503 10.5067 161.023 10.68 160.436 10.68ZM162.136 11.84V23H158.716V11.84H162.136Z" fill="#474747"/>
<path d="M171.414 11.72C172.721 11.72 173.761 12.1467 174.534 13C175.321 13.84 175.714 15 175.714 16.48V23H172.314V16.94C172.314 16.1933 172.121 15.6133 171.734 15.2C171.348 14.7867 170.828 14.58 170.174 14.58C169.521 14.58 169.001 14.7867 168.614 15.2C168.228 15.6133 168.034 16.1933 168.034 16.94V23H164.614V11.84H168.034V13.32C168.381 12.8267 168.848 12.44 169.434 12.16C170.021 11.8667 170.681 11.72 171.414 11.72Z" fill="#474747"/>
<path d="M22.6276 16C22.6276 24.2843 18.7858 31 14.0467 31C9.30755 31 5.46573 24.2843 5.46573 16C5.46573 7.71573 9.30755 1 14.0467 1C18.7858 1 22.6276 7.71573 22.6276 16Z" fill="url(#paint0_linear_42_7)"/>
<path d="M18.4133 24.4076C11.6255 28.5669 4.16789 28.3448 1.75623 23.9115C-0.655423 19.4782 2.89215 12.5126 9.67995 8.35334C16.4678 4.19407 23.9254 4.41619 26.337 8.84946C28.7487 13.2827 25.2011 20.2484 18.4133 24.4076Z" fill="url(#paint1_linear_42_7)"/>
<path d="M18.4134 8.35329C25.2012 12.5126 28.7487 19.4782 26.3371 23.9114C23.9254 28.3447 16.4678 28.5668 9.67997 24.4076C2.89217 20.2483 -0.655402 13.2827 1.75625 8.84941C4.16791 4.41615 11.6255 4.19402 18.4134 8.35329Z" fill="url(#paint2_linear_42_7)"/>
<path d="M22.6276 16C22.6276 24.2843 18.7858 31 14.0467 31C9.30755 31 5.46573 24.2843 5.46573 16C5.46573 7.71573 9.30755 1 14.0467 1C18.7858 1 22.6276 7.71573 22.6276 16Z" stroke="#6EA8FE" stroke-width="1.5" style="mix-blend-mode:color-burn"/>
<path d="M18.4133 24.4076C11.6255 28.5669 4.16789 28.3448 1.75623 23.9115C-0.655423 19.4782 2.89215 12.5126 9.67995 8.35334C16.4678 4.19407 23.9254 4.41619 26.337 8.84946C28.7487 13.2827 25.2011 20.2484 18.4133 24.4076Z" stroke="#6EA8FE" stroke-width="1.5" style="mix-blend-mode:color-burn"/>
<path d="M18.4134 8.35329C25.2012 12.5126 28.7487 19.4782 26.3371 23.9114C23.9254 28.3447 16.4678 28.5668 9.67997 24.4076C2.89217 20.2483 -0.655402 13.2827 1.75625 8.84941C4.16791 4.41615 11.6255 4.19402 18.4134 8.35329Z" stroke="#6EA8FE" stroke-width="1.5" style="mix-blend-mode:color-burn"/>
<ellipse cx="14.0467" cy="16.5173" rx="4.01435" ry="4.13793" fill="white"/>
<defs>
<linearGradient id="paint0_linear_42_7" x1="14.0467" y1="1" x2="14.0467" y2="31" gradientUnits="userSpaceOnUse">
<stop stop-color="#A8ECF9"/>
<stop offset="1" stop-color="#6EA8FE"/>
</linearGradient>
<linearGradient id="paint1_linear_42_7" x1="14.0467" y1="1" x2="14.0467" y2="31" gradientUnits="userSpaceOnUse">
<stop stop-color="#A8ECF9"/>
<stop offset="1" stop-color="#6EA8FE"/>
</linearGradient>
<linearGradient id="paint2_linear_42_7" x1="14.0467" y1="1" x2="14.0467" y2="31" gradientUnits="userSpaceOnUse">
<stop stop-color="#A8ECF9"/>
<stop offset="1" stop-color="#6EA8FE"/>
</linearGradient>
</defs>
</svg>