Signed-in users get their preferences (hidden feeds, weather location, weather toggle) stored server-side keyed by their OIDC subject and synced across devices. Anonymous visitors keep using browser localStorage, so the site stays public. First sign-in migrates existing localStorage prefs up. - config: [web.auth] section (issuer, client_id/secret, redirect, session_secret) - storage: user_preferences table + Get/PutUserPrefs - web/auth: OIDC code flow, HMAC-signed session cookie, CSRF state + nonce - web/prefs_api: GET/PUT /api/preferences (auth-gated, 64KB cap) - frontend: prefs.js sync layer seeds localStorage from server, pushes on write - header: sign-in / account control OIDC discovery is non-fatal at boot: if Authentik is down, Pete serves anonymously rather than refusing to start.
47 lines
1.7 KiB
Modula-2
47 lines
1.7 KiB
Modula-2
module pete
|
|
|
|
go 1.25.0
|
|
|
|
require (
|
|
github.com/BurntSushi/toml v1.6.0
|
|
github.com/PuerkitoBio/goquery v1.12.0
|
|
github.com/mmcdole/gofeed v1.3.0
|
|
maunium.net/go/mautrix v0.28.0
|
|
modernc.org/sqlite v1.50.1
|
|
)
|
|
|
|
require (
|
|
filippo.io/edwards25519 v1.2.0 // indirect
|
|
github.com/andybalholm/cascadia v1.3.3 // indirect
|
|
github.com/coreos/go-oidc/v3 v3.19.0 // indirect
|
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
|
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/json-iterator/go v1.1.12 // indirect
|
|
github.com/mattn/go-colorable v0.1.14 // indirect
|
|
github.com/mattn/go-isatty v0.0.22 // indirect
|
|
github.com/mattn/go-sqlite3 v1.14.44 // indirect
|
|
github.com/mmcdole/goxpp v1.1.1 // indirect
|
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
github.com/ncruces/go-strftime v1.0.0 // indirect
|
|
github.com/petermattis/goid v0.0.0-20260330135022-df67b199bc81 // indirect
|
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
|
github.com/rs/zerolog v1.35.1 // indirect
|
|
github.com/tidwall/gjson v1.19.0 // indirect
|
|
github.com/tidwall/match v1.2.0 // indirect
|
|
github.com/tidwall/pretty v1.2.1 // indirect
|
|
github.com/tidwall/sjson v1.2.5 // indirect
|
|
go.mau.fi/util v0.9.9 // indirect
|
|
golang.org/x/crypto v0.52.0 // indirect
|
|
golang.org/x/exp v0.0.0-20260508232706-74f9aab9d74a // indirect
|
|
golang.org/x/image v0.41.0 // indirect
|
|
golang.org/x/net v0.55.0 // indirect
|
|
golang.org/x/oauth2 v0.36.0 // indirect
|
|
golang.org/x/sys v0.45.0 // indirect
|
|
golang.org/x/text v0.37.0 // indirect
|
|
modernc.org/libc v1.72.3 // indirect
|
|
modernc.org/mathutil v1.7.1 // indirect
|
|
modernc.org/memory v1.11.0 // indirect
|
|
)
|