feat: create Blazor-based login component with EmptyLayout

- Create Login.razor component at /login path with Blazor form
- Create EmptyLayout to prevent MainLayout wrapping on login page
- Update Program.cs to redirect unauthenticated users to /login (Blazor route)
- Integrate with CustomAuthenticationStateProvider for proper auth state management
- Handle authentication response and token storage

Note: Login flow still has routing issues - investigating dashboard redirect

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-07-06 00:49:55 +09:00
parent b906e0f282
commit 196570c0de
11 changed files with 589 additions and 10 deletions
+41
View File
@@ -0,0 +1,41 @@
import { chromium } from '@playwright/test';
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
try {
console.log('Starting login test...');
await page.goto('http://localhost:5265/login');
// Check page structure
const html = await page.content();
const hasMenu = html.includes('메뉴') && html.includes('대시보드');
console.log(hasMenu ? '⚠ Menu visible' : '✓ Clean login page');
// Fill and submit
await page.fill('input[type="text"]', 'admin');
await page.fill('input[type="password"]', 'admin');
await page.click('button[type="submit"]');
console.log('Login submitted, waiting for response...');
await page.waitForTimeout(2000);
// Check for errors or success
const content = await page.content();
if (content.includes('로그인 실패')) {
console.log('✗ Login failed');
} else if (content.includes('오류')) {
console.log('✗ Error occurred');
} else {
console.log('✓ Attempting navigation to dashboard...');
await page.waitForNavigation({ waitUntil: 'load', timeout: 6000 });
console.log('✓ Navigation complete to: ' + page.url());
}
} catch (e) {
console.log('Error/Navigation timeout (expected): ' + e.message.substring(0, 50));
}
await browser.close();
})();