Release v2.20.1: migrate authentication to Better Auth
This commit is contained in:
1 parent
e9a53f577c
commit
fba4f99ff7
92 files changed
+5085
-1943
No files matched your search
@@ -1,44 +1,63 @@
|
||||
<div class="login-logo text-center mb-3">
|
||||
<strong>Pulse</strong> Signage
|
||||
<a class="text-reset text-decoration-none" href="/login"><strong>Pulse</strong> Signage</a>
|
||||
</div>
|
||||
<div class="card login-card mx-auto">
|
||||
<div class="card-body login-card-body">
|
||||
<p class="login-box-msg">Sign in to start your session</p>
|
||||
{{#if message}}
|
||||
<div class="alert alert-warning py-2">{{message}}</div>
|
||||
<div class="alert alert-warning py-2" data-login-initial-message>{{message}}</div>
|
||||
{{/if}}
|
||||
<form method="post" action="/login">
|
||||
<form method="post" action="/api/auth/sign-in/username" data-better-auth-login>
|
||||
{{#if returnTo}}
|
||||
<input type="hidden" name="returnTo" value="{{returnTo}}" />
|
||||
{{/if}}
|
||||
<div class="mb-3">
|
||||
<label for="username" class="visually-hidden">Username or email</label>
|
||||
<div class="input-group">
|
||||
<input id="username" name="username" type="text" class="form-control" placeholder="Username or email" autocomplete="username" value="{{username}}" required />
|
||||
<span class="input-group-text" aria-hidden="true"><i class="bi bi-person"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="visually-hidden">Password</label>
|
||||
<div class="input-group">
|
||||
<input id="password" name="password" type="password" class="form-control" placeholder="Password" autocomplete="current-password" required />
|
||||
<span class="input-group-text" aria-hidden="true"><i class="bi bi-lock"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row align-items-center g-3 mb-3">
|
||||
<div class="col-7">
|
||||
<div class="form-check">
|
||||
<input id="remember-me" name="remember_me" type="checkbox" class="form-check-input" value="1" />
|
||||
<label for="remember-me" class="form-check-label">Remember me</label>
|
||||
<div data-login-credentials>
|
||||
<div class="mb-3">
|
||||
<label for="username" class="visually-hidden">Username or email</label>
|
||||
<div class="input-group">
|
||||
<input id="username" name="username" type="text" class="form-control" placeholder="Username or email" autocomplete="username" value="{{username}}" required />
|
||||
<span class="input-group-text" aria-hidden="true"><i class="bi bi-person"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-5">
|
||||
<button type="submit" class="btn btn-primary w-100">Sign in</button>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="visually-hidden">Password</label>
|
||||
<div class="input-group">
|
||||
<input id="password" name="password" type="password" class="form-control" placeholder="Enter your password" autocomplete="current-password" required />
|
||||
<span class="input-group-text" aria-hidden="true"><i class="bi bi-lock"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3" data-login-two-factor hidden>
|
||||
<p class="mb-2 fw-semibold">Two-factor authentication</p>
|
||||
<p class="small text-body-secondary">Enter a code from your authenticator app or use a recovery code.</p>
|
||||
<label for="two-factor-code" class="visually-hidden" data-two-factor-code-label>Authenticator code</label>
|
||||
<input id="two-factor-code" name="two_factor_code" type="text" class="form-control mb-2" inputmode="numeric" autocomplete="one-time-code" disabled />
|
||||
<div class="form-check mb-2">
|
||||
<input id="trust-device" name="trust_device" type="checkbox" class="form-check-input" value="1" disabled />
|
||||
<label for="trust-device" class="form-check-label">Trust this device for 30 days</label>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between gap-2">
|
||||
<button type="button" class="btn btn-sm btn-link p-0" data-two-factor-toggle-method>Use recovery code</button>
|
||||
<button type="button" class="btn btn-sm btn-link p-0" data-two-factor-back>Back to sign in</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-warning py-2" data-login-feedback role="alert" hidden></div>
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mb-3" data-login-actions>
|
||||
<div data-login-remember>
|
||||
<div class="form-check">
|
||||
<input id="remember-me" name="remember_me" type="checkbox" class="form-check-input" value="1" />
|
||||
<label for="remember-me" class="form-check-label">Remember Me</label>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary px-4" data-login-submit>Sign In</button>
|
||||
</div>
|
||||
<div data-passkey-login-panel data-passkey-rp-id="{{passkeyRpID}}">
|
||||
<div class="login-or-divider" aria-hidden="true"><span>OR</span></div>
|
||||
<button type="button" class="btn btn-secondary w-100" data-passkey-login><i class="bi bi-fingerprint me-1" aria-hidden="true"></i>Sign in with a passkey</button>
|
||||
<p class="form-text text-center mb-0 mt-2" data-passkey-unavailable hidden>Passkeys require HTTPS and the configured Pulse hostname.</p>
|
||||
</div>
|
||||
</form>
|
||||
{{#if showForgotPassword}}
|
||||
<p class="mb-0 text-center"><a href="/forgot-password">I forgot my password</a></p>
|
||||
<p class="mb-0 mt-3"><a href="/forgot-password">I forgot my password</a></p>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user