70 lines
2.3 KiB
HTML
70 lines
2.3 KiB
HTML
{{define "content"}}
|
|
<div class="auth-panel">
|
|
<h1>Sign in to Relata</h1>
|
|
|
|
{{if .OAuthEnabled}}
|
|
<p class="muted">Sign in with your organisation account to reach your workspace.</p>
|
|
<p>
|
|
<a class="btn btn-primary btn-large btn-block" href="/auth/oauth/start{{if .Next}}?next={{.Next}}{{end}}">
|
|
Sign in with {{.ProviderName}}
|
|
</a>
|
|
</p>
|
|
{{end}}
|
|
|
|
{{if and .OAuthEnabled .LocalEnabled}}
|
|
<p class="or-divider"><span>or</span></p>
|
|
{{end}}
|
|
|
|
{{if .LocalEnabled}}
|
|
<form method="post" action="/login" class="stack" novalidate>
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
|
|
|
<div class="field">
|
|
<label for="username">Username</label>
|
|
<input id="username" name="username" type="text" autocomplete="username"
|
|
required {{if not .OAuthEnabled}}autofocus{{end}} autocapitalize="none" spellcheck="false"
|
|
aria-describedby="username-hint">
|
|
<p id="username-hint" class="hint">The username created with <code>relata createadmin</code>.</p>
|
|
</div>
|
|
|
|
<div class="field">
|
|
<label for="password">Password</label>
|
|
<input id="password" name="password" type="password" autocomplete="current-password" required>
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary">Sign in</button>
|
|
</form>
|
|
|
|
{{if .OAuthEnabled}}
|
|
<p class="hint">
|
|
Local accounts exist to recover from a problem with {{.ProviderName}}. If you have an
|
|
organisation account, use the button above — a local account has its own separate workspace.
|
|
</p>
|
|
{{end}}
|
|
{{end}}
|
|
|
|
{{if not (or .OAuthEnabled .LocalEnabled)}}
|
|
<div class="callout">
|
|
<h2>No way to sign in is configured</h2>
|
|
<p>
|
|
Neither federated nor local sign-in is enabled. Set <code>RELATA_OAUTH_ENABLED=true</code>
|
|
or <code>RELATA_LOCAL_LOGIN_ENABLED=true</code> and restart.
|
|
</p>
|
|
</div>
|
|
{{end}}
|
|
|
|
{{if and .FirstRun .LocalEnabled}}
|
|
<div class="callout">
|
|
<h2>No accounts exist yet</h2>
|
|
<p>Create the first administrator from the command line:</p>
|
|
<pre><code>relata createadmin --username admin</code></pre>
|
|
<p class="muted">You will be prompted for a password. It is never shown or logged.</p>
|
|
</div>
|
|
{{end}}
|
|
|
|
<p class="muted auth-footer">
|
|
New here? <a href="/">Read what Relata does</a>.
|
|
</p>
|
|
</div>
|
|
{{end}}
|