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" . }}
|
{{ template "header.html" . }}
|
||||||
|
|
||||||
<div class="theme-panel">
|
<div class="nb-card">
|
||||||
{{ if .LoggedOut }}
|
{{ if .LoggedOut }}
|
||||||
<h2 class="theme-heading">Logged Out</h2>
|
<h1 class="nb-heading">Logged Out</h1>
|
||||||
<div>
|
<p class="nb-subheading">You have been successfully logged out.</p>
|
||||||
<div class="dex-subtle-text">You have been successfully logged out.</div>
|
{{ else }}
|
||||||
</div>
|
<h1 class="nb-heading">Session Not Found</h1>
|
||||||
{{ else }}
|
<p class="nb-subheading">No active session found.</p>
|
||||||
<h2 class="theme-heading">Session Not Found</h2>
|
{{ end }}
|
||||||
<div>
|
|
||||||
<div class="dex-subtle-text">No active session found.</div>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if .BackURL }}
|
|
||||||
<div class="theme-form-row">
|
|
||||||
<a href="{{ .BackURL }}" class="dex-subtle-text">← Back to Application</a>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
|
{{ if .BackURL }}
|
||||||
|
<div class="nb-back-link">
|
||||||
|
<a href="{{ .BackURL }}" class="nb-link">← Back to Application</a>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ template "footer.html" . }}
|
{{ template "footer.html" . }}
|
||||||
|
|||||||
@@ -1,37 +1,44 @@
|
|||||||
|
|
||||||
{{ template "header.html" . }}
|
{{ template "header.html" . }}
|
||||||
|
|
||||||
<div class="theme-panel">
|
<div class="nb-card">
|
||||||
<h2 class="theme-heading">Two-factor authentication</h2>
|
<h1 class="nb-heading">Two-factor authentication</h1>
|
||||||
{{ if not (eq .QRCode "") }}
|
{{ 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;">
|
<div style="text-align: center; margin: 1em 0;">
|
||||||
<img src="data:image/png;base64,{{ .QRCode }}" alt="QR code" width="200" height="200"/>
|
<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>
|
|
||||||
{{ 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>
|
|
||||||
|
|
||||||
{{ if .Invalid }}
|
|
||||||
<div id="login-error" class="dex-error-box">
|
|
||||||
Invalid code. Please try again.
|
|
||||||
</div>
|
</div>
|
||||||
|
{{ else }}
|
||||||
|
<p class="nb-subheading">Enter the code from your authenticator app.</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<button tabindex="2" id="submit-login" type="submit" class="dex-btn theme-btn--primary">Verify</button>
|
<form method="post" action="{{ .PostURL }}">
|
||||||
</form>
|
{{ if .Invalid }}
|
||||||
|
<div class="nb-error">
|
||||||
|
Invalid code. Please try again.
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<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>
|
</div>
|
||||||
|
|
||||||
{{ template "footer.html" . }}
|
{{ template "footer.html" . }}
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ func (c *EmbeddedIdPConfig) ToYAMLConfig() (*dex.YAMLConfig, error) {
|
|||||||
Public: true,
|
Public: true,
|
||||||
RedirectURIs: dashboardRedirectURIs,
|
RedirectURIs: dashboardRedirectURIs,
|
||||||
PostLogoutRedirectURIs: []string{
|
PostLogoutRedirectURIs: []string{
|
||||||
|
c.Issuer,
|
||||||
logoutURL,
|
logoutURL,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -167,6 +168,7 @@ func (c *EmbeddedIdPConfig) ToYAMLConfig() (*dex.YAMLConfig, error) {
|
|||||||
Public: true,
|
Public: true,
|
||||||
RedirectURIs: cliRedirectURIs,
|
RedirectURIs: cliRedirectURIs,
|
||||||
PostLogoutRedirectURIs: []string{
|
PostLogoutRedirectURIs: []string{
|
||||||
|
c.Issuer,
|
||||||
logoutURL,
|
logoutURL,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user