Separate dashboard port, first-run password setup and default trusted proxies
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a34ff96490
commit
c22d452720
25 files changed
+654
-109
No files matched your search
@@ -0,0 +1,36 @@
|
||||
@page "/setup"
|
||||
@layout EmptyLayout
|
||||
@attribute [AllowAnonymous]
|
||||
@using Flypaper.Web.Auth
|
||||
@inject AdminAuthenticator Admin
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
<PageTitle>Flypaper · Einrichten</PageTitle>
|
||||
|
||||
<h1 class="login-title">Flypaper einrichten</h1>
|
||||
|
||||
<form method="post" action="/auth/setup" class="card form">
|
||||
<AntiforgeryToken />
|
||||
<p class="muted">Lege das Admin-Passwort für das Dashboard fest. Diese Seite ist nur erreichbar, solange noch kein Passwort existiert.</p>
|
||||
<label for="password">Passwort <span class="muted">(mindestens @AdminAuthenticator.MinimumPasswordLength Zeichen)</span></label>
|
||||
<input id="password" name="password" type="password" autocomplete="new-password" minlength="@AdminAuthenticator.MinimumPasswordLength" autofocus required />
|
||||
<label for="confirmation">Passwort wiederholen</label>
|
||||
<input id="confirmation" name="confirmation" type="password" autocomplete="new-password" required />
|
||||
@if (Error is not null)
|
||||
{
|
||||
<p class="error">@Error</p>
|
||||
}
|
||||
<button type="submit">Passwort festlegen</button>
|
||||
</form>
|
||||
|
||||
@code {
|
||||
[SupplyParameterFromQuery(Name = "error")] private string? Error { get; set; }
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
if (await Admin.IsConfiguredAsync())
|
||||
{
|
||||
Navigation.NavigateTo("/login");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user