Add OIDC browser approval and PKCE session handoff for pages CLI
Build and publish container images / images (push) Successful in 14m39s
Release container images / release (push) Successful in 25s

This commit is contained in:
Anya Tokugawa committed 2026-11-01 20:26:45 +09:00
1 parent 2af87b4f58
commit 60f5fb1881
18 files changed
+1397 -23

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
{{ define "auth-cli" }}
{{ if .CLIDone }}
<p role="status">{{ T "auth.cli_done" }}</p>
{{ else }}
<p>{{ T "auth.cli_warning" }}</p>
<p><strong>{{ .CLIOrigin }}</strong></p>
{{ if .CLILogin }}
<a class="auth-provider-button" href="{{ .CLILogin }}">{{ T "auth.login_oidc" }}</a>
{{ else }}
<p>{{ T "auth.cli_account" }}: <strong>{{ .CLIUsername }}</strong></p>
<p>{{ T "auth.cli_access" }}</p>
<form class="auth-form" method="post" action="/_/auth/cli/verify">
<input type="hidden" name="request" value="{{ .CLIRequest }}">
<input type="hidden" name="csrf" value="{{ .CLICSRF }}">
<label>{{ T "auth.cli_code" }}<input name="user_code" autocomplete="off" autocapitalize="characters" spellcheck="false" maxlength="9" required autofocus placeholder="ABCD-1234"></label>
{{ if .CLITOTP }}<label>{{ T "auth.totp_code" }}<input name="totp" inputmode="numeric" pattern="[0-9]{6}" autocomplete="one-time-code" required></label>{{ end }}
<button class="auth-primary" type="submit" name="decision" value="approve">{{ T "auth.cli_approve" }}</button>
<button class="auth-secondary" type="submit" name="decision" value="deny" formnovalidate>{{ T "auth.cli_deny" }}</button>
</form>
{{ end }}{{ end }}
{{ end }}