repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

pico / auth / html
Antonio Mika · 07 Oct 23

redirect.page.tmpl

 1{{template "base" .}}
 2
 3{{define "title"}}auth redirect{{end}}
 4
 5{{define "meta"}}{{end}}
 6
 7{{define "attrs"}}{{end}}
 8
 9{{define "body"}}
10<header>
11    <h1 class="text-2xl">Auth Redirect</h1>
12    <hr />
13</header>
14<main>
15    <section>
16        <h2 class="text-xl">You are being redirected to {{.redirect_uri}}</h2>
17        <p>
18            Here is their auth request data:
19        </p>
20
21        <article>
22            <h2 class="text-lg">Client ID</h2>
23            <div>{{.client_id}}</div>
24        </article>
25
26        <br />
27
28        <article>
29            <h2 class="text-lg">Redirect URI</h2>
30            <div>{{.redirect_uri}}</div>
31        </article>
32
33        <br />
34
35        <article>
36            <h2 class="text-lg">Scope</h2>
37            <div>{{.scope}}</div>
38        </article>
39
40        <br />
41
42        <article>
43            <h2 class="text-lg">Response Type</h2>
44            <div>{{.response_type}}</div>
45        </article>
46
47        <br />
48
49        <article>
50            <h2 class="text-lg">If you would like to continue authenticating with this service, ssh into a pico service and generate a token. Then input it here and click submit.</h2>
51            <br />
52            <form action="/redirect" method="POST">
53                <label for="token">Auth Token:</label><br>
54                <input type="text" id="token" name="token"><br>
55                <br />
56                <input type="hidden" id="redirect_uri" name="redirect_uri" value="{{.redirect_uri}}">
57                <input type="hidden" id="response_type" name="response_type" value="{{.response_type}}">
58                <input type="submit" value="Submit">
59            </form>
60        </article>
61    </section>
62</main>
63{{template "marketing-footer" .}}
64{{end}}