{{define "title"}}{{if .State.Unavailable}}Base{{else}}Sign in to {{.Name}}{{end}}{{end}} {{define "main"}}{{$s := .State}}
base
{{if eq $s.Step "continue"}}

Taking you to Keymail

Taking you to Keymail to confirm it's you.

Continue to Keymail {{else if eq $s.Step "sent"}}

Check your email

{{if $s.SentTo}}We sent a link to {{$s.SentTo}}.{{else}}We sent a link to your inbox.{{end}} The link works once and expires soon.

{{with $s.ReturnTo}}{{end}}
{{else}}

Sign in to {{.Name}}

{{if .Refused}}

Sign-in isn't available for that address. Ask whoever runs {{.Name}} to invite you, or try another address.

{{else if $s.Problem}}

{{.ProblemText}}

{{else if .Linking}}

To connect your Oficina account, sign in with your email.

{{else if not .Oficina}}

Use your work email.

{{end}}{{with .Oficina}}Sign in with Oficina

Or use your work email.

{{end}}
{{with $s.Proof}}{{.Fields}}{{end}} {{with $s.ReturnTo}} {{end}}{{if or $s.Force (eq $s.Problem "keymail")}} {{end}}
{{with $s.Passkey}}{{/* Hidden until rastrillo's door script finds the browser can run a passkey ceremony, so with scripts off there is no dead button. */}}

{{end}}{{end}}
{{end}}