ShiftScheduler/Client/Shared/LoginDisplay.razor
copilot-swe-agent[bot] 2443cc06a7 Add Google authentication with authorized email configuration
Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com>
2025-08-26 04:15:48 +00:00

29 lines
No EOL
779 B
Text

@inject IJSRuntime JSRuntime
<div class="login-container">
<div class="login-card">
<h2>Welcome to Shift Scheduler</h2>
<p>Please sign in with your Google account to access the application.</p>
@if (!string.IsNullOrEmpty(ErrorMessage))
{
<div class="alert alert-danger">
@ErrorMessage
</div>
}
<button class="btn btn-primary login-btn" @onclick="Login">
<span class="google-icon">🔐</span>
Sign in with Google
</button>
</div>
</div>
@code {
[Parameter] public string? ErrorMessage { get; set; }
private async Task Login()
{
await JSRuntime.InvokeVoidAsync("window.location.href", "/api/auth/login");
}
}