8 Commits
Author SHA1 Message Date
CatoandClaude f40882f6d5 feat(clients): alsoOrigins, Heidi primary is fragheidi.ch (#44)
Redirect URIs are stored primary-first, then the extras sorted. The sector
still comes from the first redirect URI, i.e. the primary origin. A host may
belong to one app only, primary or extra.

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-03 20:32:59 +01:00
CatoandClaude Opus 5.5 02d353a5cd feat(signin): the sign-in page speaks the language the app was showing (ui_locales) (#41)
A reader on Heidi's German pages with an English browser pressed the shared
sign-in button and got this page in English: it only read Accept-Language.
The app's authorize request now carries OIDC ui_locales (AccountKit sends it),
and the page prefers it, then the browser, then English. <main> carries the
chosen lang.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 05:21:43 +01:00
Cato def289d6c3 feat(signin): the provider screen carries the app's own name, icon and accent (#39)
The page between an app's button and Google/GitHub was a bare form, so a
person coming from Heidi saw nothing of Heidi. Each client's registration
now carries its icon (on its own origin, from its live page) and, where the
app ships one, its accent; the page shows them, with a letter tile and the
neutral look otherwise. One line says Google and GitHub will show the
shared sign-in service, not the app.
2026-11-10 10:24:42 +01:00
CatoandClaude 04e5a1ddd2 feat(pages): the sign-in and error pages speak the visitor's language (#38)
The page in the middle of every sign-in was English only, so a German reader
pressed a German button and landed on an English page. It now reads the
browser's Accept-Language (nothing stored, nothing asked) and answers in
German, French, Italian, Russian, Romansh or English; Swiss German reads as
Standard German; anything else falls back to English. Links inherit the page
colour instead of default blue. A test holds every line in every language.


Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-10 09:14:43 +01:00
CatoandClaude abb53a2fab fix(headers): same-origin referrer policy so the sign-in form can start (#37)
With `Referrer-Policy: no-referrer` browsers send `Origin: null` on the
same-origin POST to /start. start() requires its own origin, so every
provider button ended on /problem?error=start_failed. Found live on
2026-11-10, the first time a provider (Google) was switched on; the tests
call the handler with `origin` set by hand and could not see it.

`same-origin` keeps what no-referrer was for (nothing about a sign-in
reaches a provider or any other site) and lets the form send its origin.
Checked in Chromium: no-referrer -> `Origin: null`, same-origin -> the origin.
A test pins the policy.


Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-10 08:53:30 +01:00
Cato c58f77516a fix(providers): name GitHub keys GH_CLIENT_* so Actions can store them (#35)
GitHub Actions refuses any secret name that starts with GITHUB_, so
GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET could never be pasted. The
provider now reads GH_CLIENT_ID and GH_CLIENT_SECRET, and the workflow
list stays in the same order as UPSTREAMS[].env.
2026-11-10 08:34:52 +01:00
CatoandClaude 9e26d57c5a feat(providers): every free provider better-auth supports, a published list, and keys in one step (#27)
Adds Microsoft, LinkedIn, Discord, GitLab, Slack, Twitch and Reddit beside
Google, GitHub and Facebook, each on only when its keys are set and asked
for nothing but who the person is (a claims request naming email, which
better-auth adds for Twitch, is stripped at /start). Apple and X keep their
code but are marked paid.

/api/providers publishes the providers switched on, with their names;
AccountKit's button reads it, so an app never names one that is not on.

provider-keys.yml copies keys pasted as this repository's secrets to the
box (loki box-env-keys.yml) and then switches the button on in every
client app. docs/providers.md has each provider's steps and why it is or
is not free, with sources.


Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 21:26:49 +01:00
CatoandClaude Opus 5.5 5a79056056 feat: the shared bitbaum sign-in (OIDC provider, pairwise subjects) (#1)
* feat: the shared bitbaum sign-in (OIDC provider, pairwise subjects)

One OIDC provider holding the Google, Apple, GitHub, X and Meta
credentials once, for every accountkit app (fleet STACK.md, "Identity"):

- better-auth 1.7 + @better-auth/oauth-provider + jwt (RS256); discovery
  at the origin, authorize with PKCE S256 required, token with
  client_secret_post, userinfo, JWKS
- pairwise subject per app (HMAC of redirect host + user); the email
  scope is answered with a per-app .invalid placeholder
- upstream providers each on only when all their env is set, asked for
  no email and no profile; provider tokens are never stored
- consent-free first-party clients from a registry (lib/clients.ts),
  synced at start from per-app secrets in env
- one pairwise-subject derivation (lib/subject.ts), pinned to a literal,
  with a persona input for future non-root lives only
- tests: PKCE flow end to end against fake upstreams, pairwise sub
  differs per app and is stable per app, two providers reporting one
  verified address stay two people, and accountkit's real runtime
  signs in with SIGNIN_* env alone

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

* build: standalone output for the self-host deploy

loki deploy.sh ships .next/standalone and stops without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

* ci: browser smoke on the production build

The fleet rollout gate holds any consumer of a shared package (accountkit,
design-tokens, limitkit) until ci.yml and browser-smoke.yml pass on the
commit. This one starts the production build against PostgreSQL built from
drizzle/ and drives Chromium through a real authorize request from Solon:
health with the database up, discovery for the given issuer, and the app's
sign-in page at 390px with no sideways scroll and no console errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 23:32:31 +01:00