From bb6bc2387d58c737dbf92e73f8544bf39319dbd8 Mon Sep 17 00:00:00 2001 From: Lena Date: Sat, 1 Aug 2026 00:00:00 +0000 Subject: Enter git-forge A small self-hosted git forge: HTTP push and pull, cgit browsing, local and OIDC accounts, TOTP, scoped push tokens, per-repo permissions, issues, a wiki, and outbound mail. It does not reimplement git. git-http-backend and cgit run as CGI behind its own listener, which authorises every request before exec'ing either. One binary, one data directory, one listener: no database, no JavaScript, and state is JSON in a git repo with a working tree. --- templates/totp-enroll.html | 96 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 templates/totp-enroll.html (limited to 'templates/totp-enroll.html') diff --git a/templates/totp-enroll.html b/templates/totp-enroll.html new file mode 100644 index 0000000..da3d301 --- /dev/null +++ b/templates/totp-enroll.html @@ -0,0 +1,96 @@ +{{define "title"}}Authenticator - {{.Site}}{{end}} +{{define "main"}} +

Authenticator

+ +{{with .Data.Codes}} +

Recovery codes

+

Each of these works once, in place of a code. They are not shown again.

+
{{range .}}{{.}}
+{{end}}
+{{end}} + +{{if .Data.Enrolled}} +

+This account has an authenticator, and {{.Data.Left}} recovery codes left. +

+ +

New recovery codes

+

Making new ones stops the old ones working.

+
+ +{{if .Data.Local}} +

+ + +

+{{else}} +

+ + +

+{{end}} +

+
+ +

Remove

+{{if .Data.Required}} +

+This account holds the global admin flag, so it must keep an authenticator. +Another admin has to take the flag away first. +

+{{else}} +

Removing it signs out every session for this account.

+
+ +{{if .Data.Local}} +

+ + +

+{{else}} +

+ + +

+{{end}} +

+
+{{end}} + +{{else}} +

+Type this secret into an authenticator, or give it the URI. There is no QR +code: it would be useless in a terminal browser. +

+
{{.Data.Secret}}
+
+{{.Data.URI}}
+

+Then prove it took, which is what enrols it. Enrolling signs out every other +session. +{{if .Data.Local}} +It takes the password as well: a stolen cookie must not be able to put a second +factor on this account and lock its owner out. +{{else}} +This account signs in through an external provider and has no password here, so +enrolling rests on this session alone. The address on file is told, and an admin +can clear an authenticator you did not enrol. +{{end}} +

+
+ + +

+ + +

+{{if .Data.Local}} +

+ + +

+{{end}} +

+
+{{end}} +{{end}} -- cgit v1.2.3