Fix admin client and auth flows
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m34s

This commit is contained in:
2026-07-07 18:17:26 +09:00
parent 09f07adf3f
commit fc655e20c1
50 changed files with 148 additions and 301 deletions
@@ -153,7 +153,6 @@ public class CustomAuthenticationStateProvider : AuthenticationStateProvider
{
// TokenStore 초기화
_tokenStore.Clear();
NotifyAuthenticationStateChanged(GetAuthenticationStateAsync());
}
@@ -5,4 +5,5 @@ public interface ILocalStorageService
Task<string?> GetItemAsStringAsync(string key);
Task SetItemAsStringAsync(string key, string value);
Task RemoveItemAsync(string key);
Task ClearAuthAsync();
}
@@ -15,7 +15,7 @@ public class LocalStorageService : ILocalStorageService
{
try
{
return await _jsRuntime.InvokeAsync<string>("localStorage.getItem", key);
return await _jsRuntime.InvokeAsync<string>("taxbaikAdminSession.getLocalStorageItem", key);
}
catch
{
@@ -27,7 +27,7 @@ public class LocalStorageService : ILocalStorageService
{
try
{
await _jsRuntime.InvokeVoidAsync("localStorage.setItem", key, value);
await _jsRuntime.InvokeVoidAsync("taxbaikAdminSession.setLocalStorageItem", key, value);
}
catch { }
}
@@ -36,7 +36,20 @@ public class LocalStorageService : ILocalStorageService
{
try
{
await _jsRuntime.InvokeVoidAsync("localStorage.removeItem", key);
await _jsRuntime.InvokeVoidAsync("taxbaikAdminSession.removeLocalStorageItem", key);
}
catch { }
}
public async Task ClearAuthAsync()
{
try
{
await RemoveItemAsync("accessToken");
await RemoveItemAsync("refreshToken");
await RemoveItemAsync("tokenExpiry");
await RemoveItemAsync("auth_token");
await RemoveItemAsync("admin-remembered-username");
}
catch { }
}