| 1 | {{/* signin — GET /signin (auth.go's signin handler): estilo's sign-in |
| 2 | form, or once a link is on its way, the check-your-email state that |
| 3 | replaces it, or the card between the form and Keymail. rastrillo/auth's |
| 4 | own handlers never render a page of their own here: Begin, Callback |
| 5 | and Verify report every outcome by redirecting back here with a query |
| 6 | the handler reads, and the two pages they do ask for — the refusal |
| 7 | and the confirm step — are this template too (refused, |
| 8 | renderConfirm). |
| 9 | |
| 10 | The form POSTs to rastrillo/auth's own Begin through gateBegin |
| 11 | (app.go, auth.go). An address whose domain runs Keymail is answered |
| 12 | with this page again in its Keymail state (.Continue): the door's |
| 13 | card, and a meta refresh that goes on to Keymail — a navigation from a |
| 14 | page, which form-action does not govern. The form carries force=1 only |
| 15 | on ?force=1 (a failed Keymail exchange), to ask for an emailed link. |
| 16 | The bar shows the brand only: nobody is signed in here to have an |
| 17 | account, and everything the brand could link to is behind the |
| 18 | session gate. Data: signinView. */}} |
| 19 | {{define "page-head"}}{{with .Continue}}{{template "home-oauth-head" .}}{{end}}{{end}} |
| 20 | {{/* The confirm step an emailed link opens on (auth.go's renderConfirm): |
| 21 | the door with its address field taken away, and one Sign in button |
| 22 | that posts the link's token back. GET /auth/verify spends nothing; |
| 23 | this POST does. estilo has no confirm variant, so the form is this |
| 24 | page's own. The token is the link's own query value, escaped here. */}} |
| 25 | {{define "content"}}{{with .Confirm}}{{template "estilo-door-open" .Door}} |
| 26 | <h1>{{.Door.Heading}}</h1> |
| 27 | {{- with .Door.Lede}} |
| 28 | <p estilo-signin-lede>{{.}}</p> |
| 29 | {{- end}} |
| 30 | <form rst-form estilo-signin-form method="post" action="{{.Action}}"> |
| 31 | <input type="hidden" name="token" value="{{.Token}}"> |
| 32 | <div rst-form-foot><button rst-btn="primary" type="submit" autofocus>{{.Door.Submit}}</button></div> |
| 33 | </form> |
| 34 | {{template "estilo-door-close"}} |
| 35 | {{- else with .Sent}}{{template "estilo-signin-sent" .}}{{else}}{{template "estilo-signin" .SignIn}}{{end}}{{end}} |
| 36 | |