mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 07:16:38 +00:00
polished UI and fix post_login_redirect_uri
This commit is contained in:
@@ -1,25 +1,19 @@
|
||||
|
||||
{{ template "header.html" . }}
|
||||
|
||||
<div class="theme-panel">
|
||||
<div class="nb-card">
|
||||
{{ if .LoggedOut }}
|
||||
<h2 class="theme-heading">Logged Out</h2>
|
||||
<div>
|
||||
<div class="dex-subtle-text">You have been successfully logged out.</div>
|
||||
</div>
|
||||
<h1 class="nb-heading">Logged Out</h1>
|
||||
<p class="nb-subheading">You have been successfully logged out.</p>
|
||||
{{ else }}
|
||||
<h2 class="theme-heading">Session Not Found</h2>
|
||||
<div>
|
||||
<div class="dex-subtle-text">No active session found.</div>
|
||||
</div>
|
||||
<h1 class="nb-heading">Session Not Found</h1>
|
||||
<p class="nb-subheading">No active session found.</p>
|
||||
{{ end }}
|
||||
|
||||
{{ if .BackURL }}
|
||||
<div class="theme-form-row">
|
||||
<a href="{{ .BackURL }}" class="dex-subtle-text">← Back to Application</a>
|
||||
<div class="nb-back-link">
|
||||
<a href="{{ .BackURL }}" class="nb-link">← Back to Application</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
|
||||
{{ template "footer.html" . }}
|
||||
|
||||
@@ -1,36 +1,43 @@
|
||||
|
||||
{{ template "header.html" . }}
|
||||
|
||||
<div class="theme-panel">
|
||||
<h2 class="theme-heading">Two-factor authentication</h2>
|
||||
<div class="nb-card">
|
||||
<h1 class="nb-heading">Two-factor authentication</h1>
|
||||
{{ if not (eq .QRCode "") }}
|
||||
<p>Scan the QR code below using your authenticator app, then enter the code.</p>
|
||||
<p class="nb-subheading">Scan the QR code below using your authenticator app, then enter the code.</p>
|
||||
<div style="text-align: center; margin: 1em 0;">
|
||||
<img src="data:image/png;base64,{{ .QRCode }}" alt="QR code" width="200" height="200"/>
|
||||
</div>
|
||||
{{ else }}
|
||||
<p>Enter the code from your authenticator app.</p>
|
||||
<p class="theme-heading">{{ .Issuer }}</p>
|
||||
<p class="nb-subheading">Enter the code from your authenticator app.</p>
|
||||
{{ end }}
|
||||
<form method="post" action="{{ .PostURL }}">
|
||||
<div class="theme-form-row">
|
||||
<div class="theme-form-label">
|
||||
<label for="totp">One-time code</label>
|
||||
</div>
|
||||
<input tabindex="1" required id="totp" name="totp" type="text"
|
||||
inputmode="numeric" pattern="[0-9]*" maxlength="6"
|
||||
autocomplete="one-time-code"
|
||||
class="theme-form-input" placeholder="000000"
|
||||
autofocus/>
|
||||
</div>
|
||||
|
||||
<form method="post" action="{{ .PostURL }}">
|
||||
{{ if .Invalid }}
|
||||
<div id="login-error" class="dex-error-box">
|
||||
<div class="nb-error">
|
||||
Invalid code. Please try again.
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<button tabindex="2" id="submit-login" type="submit" class="dex-btn theme-btn--primary">Verify</button>
|
||||
<div class="nb-form-group">
|
||||
<label class="nb-label" for="totp">One-time code</label>
|
||||
<input
|
||||
type="text"
|
||||
id="totp"
|
||||
name="totp"
|
||||
class="nb-input"
|
||||
inputmode="numeric"
|
||||
pattern="[0-9]*"
|
||||
maxlength="6"
|
||||
autocomplete="one-time-code"
|
||||
placeholder="000000"
|
||||
autofocus
|
||||
required
|
||||
>
|
||||
</div>
|
||||
|
||||
<button type="submit" id="submit-login" class="nb-btn">
|
||||
Verify
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -158,6 +158,7 @@ func (c *EmbeddedIdPConfig) ToYAMLConfig() (*dex.YAMLConfig, error) {
|
||||
Public: true,
|
||||
RedirectURIs: dashboardRedirectURIs,
|
||||
PostLogoutRedirectURIs: []string{
|
||||
c.Issuer,
|
||||
logoutURL,
|
||||
},
|
||||
},
|
||||
@@ -167,6 +168,7 @@ func (c *EmbeddedIdPConfig) ToYAMLConfig() (*dex.YAMLConfig, error) {
|
||||
Public: true,
|
||||
RedirectURIs: cliRedirectURIs,
|
||||
PostLogoutRedirectURIs: []string{
|
||||
c.Issuer,
|
||||
logoutURL,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user