21 Commits
Author SHA1 Message Date
CatoandClaude 587b65e0f1 fix(auth): one thing the sign-in screen asks for (#98)
"Email me a sign-in link instead" and "Forgot your password?" are text
actions (classes.textAction), not outlined boxes. Loki's sign-in at 390px
stacked nine outlined boxes of equal weight and the filled Sign in read as
one of many. A text action is still a full touch target.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-14 10:24:18 +01:00
CatoandClaude 5034cccd47 fix(auth): offer GitHub once on a sign-in screen (#96)
A product that turns on its own GitHub button and whose shared sign-in also
lists GitHub drew "Continue with GitHub" twice. The shared button now names
only the other providers when GitHub has its own button.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 22:15:05 +01:00
Cato 68e1ffaea3 fix(auth): OrangeCat first among the "Continue with …" buttons (#93)
With OrangeCat and the shared sign-in both on, "Continue with Google or
GitHub" sat directly above "Continue with OrangeCat" and read as its
heading (BiasLens sign-in at 1920px, 2026-11-12). OidcButtons now lists
OrangeCat, the fleet's own account, first. Render test fails on the old
order; dist rebuilt.
2026-11-12 11:11:31 +01:00
CatoandClaude Opus 5.5 9d61706fe3 feat(oidc): the shared sign-in and OrangeCat are told the page's language (ui_locales) (#90)
A sign-in started on Heidi's German pages from an English browser landed on
an English provider page: the provider could only read Accept-Language.
OidcButtons, SignInForm and SignUpForm now send OIDC ui_locales on the
authorize request: the new optional locale prop, else <html lang>, so every
app gets it without a code change. GitHub is not sent it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 05:29:57 +01:00
CatoandClaude ee059919c0 feat(screens): a product's own code to sign in, and a claim form (#67) (#79)
AOZ's people start from a personal code: they sign in with it, and they
claim it once with an email and a first password. AccountKit's server has
both (domainCredentials, provisioning); its screens had neither, so AOZ kept
its own code field and register screen beside SignInForm.

- SignInForm takes codeDoor: a quiet button opens one field in the product's
  words, sent to /sign-in/domain. A personal link (?<param>=) opens it and
  signs in once, then leaves the address bar. An account with a second
  factor is refused in AccountKit's words, with the way back on screen.
- ClaimForm: a code (or a claim link the page holds), an email and a first
  password to /provision/claim, saying what happened and turning every
  CLAIM_* refusal into a sentence.
- Labels `code` and `claim` in all seven languages; both calls go through the
  client's $fetch. Browser checks drive both in every language at 320/390px.

Closes #67.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-03 00:27:15 +01:00
CatoandClaude Opus 5.5 0b4100cff8 feat(screens): a product's own GitHub app on the shared screens (#76)
* feat(auth): Lightning login (LNURL-auth, LUD-04), opt-in per deployment

A free, Bitcoin-native way in: the person's own Lightning wallet signs a
one-time challenge shown as a QR code (or opened through a lightning: link on
the same device). No key, no third party, nothing paid. The signed key is a
sign-in method (providerId "lightning"), never an email.

- /lightning/start mints a challenge (five minutes, used once) and binds it
  to the asking browser with a signed cookie; /lightning/callback is the
  wallet's LUD-04 call and checks the DER secp256k1 signature of k1;
  /sign-in/lightning (polled) signs in or creates the person;
  /lightning/link adds a wallet to the signed-in person, never one that
  already signs in to someone else.
- A second factor applies; minting and the wallet's call spend the
  credential bucket.
- SignInForm and SignUpForm offer "Sign in with a Lightning wallet",
  AccountPanel "Add Lightning wallet"; words in all six languages.
- Off until ACCOUNTKIT_LIGHTNING=1.

Tests: LUD-01's own LNURL both ways, a signature made by OpenSSL, and the
whole flow on a real database (PGlite) with a wallet that signs as LUD-04
says: sign-in and sign-in again, a forged signature, an onlooker without the
browser's cookie, a second factor, linking and a taken wallet, and nothing
mounted without the opt-in. Browser: QR, wallet link, 44px, no sideways
scroll at 320 and 390px.

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

* feat(screens): a product's own GitHub app on the shared screens

Loki keeps its GitHub sign-in (its own app, githubSignIn: true). The shared
screens drew only the shared sign-in and OrangeCat, so Loki could not move onto
SignInForm without losing it. signInMethods takes githubSignIn and reports
methods.github; SignInForm, SignUpForm and AccountPanel draw it beside
OrangeCat. The variables alone still offer nothing.

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-11-02 23:41:49 +01:00
CatoandClaude e282d1e6e4 feat(auth): Lightning login (LNURL-auth, LUD-04), opt-in per deployment (#75)
A free, Bitcoin-native way in: the person's own Lightning wallet signs a
one-time challenge shown as a QR code (or opened through a lightning: link on
the same device). No key, no third party, nothing paid. The signed key is a
sign-in method (providerId "lightning"), never an email.

- /lightning/start mints a challenge (five minutes, used once) and binds it
  to the asking browser with a signed cookie; /lightning/callback is the
  wallet's LUD-04 call and checks the DER secp256k1 signature of k1;
  /sign-in/lightning (polled) signs in or creates the person;
  /lightning/link adds a wallet to the signed-in person, never one that
  already signs in to someone else.
- A second factor applies; minting and the wallet's call spend the
  credential bucket.
- SignInForm and SignUpForm offer "Sign in with a Lightning wallet",
  AccountPanel "Add Lightning wallet"; words in all six languages.
- Off until ACCOUNTKIT_LIGHTNING=1.

Tests: LUD-01's own LNURL both ways, a signature made by OpenSSL, and the
whole flow on a real database (PGlite) with a wallet that signs as LUD-04
says: sign-in and sign-in again, a forged signature, an onlooker without the
browser's cookie, a second factor, linking and a taken wallet, and nothing
mounted without the opt-in. Browser: QR, wallet link, 44px, no sideways
scroll at 320 and 390px.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 23:34:27 +01:00
CatoandClaude Opus 5.5 e31a41ff6b feat(auth): the sign-in link's email also carries a code to type on the page (#70)
* feat(auth): the sign-in link's email also carries a code to type on the page

A sign-in link opens wherever the mail app opens it: often another browser,
or another device, than the one where the person asked. The same email now
carries a six-digit code, typed on the page that asked for the link. It is
the same method (the address proven by mail), so it is free and needs no
third party: the owner asked for every free way in.

- Minted only with a sign-in link, only for a mailer with `codes: true`
  (createAuthMailer has it); the link request then answers { code: true } and
  SignInForm offers the field. A product with its own mailer changes nothing
  until it prints `extra.code`.
- Ten minutes, three tries, stored hashed; guessing spends the credential
  bucket. A second factor applies, answered as JSON like a password.
- better-auth's other email-code endpoints (a code on its own, reset by code,
  verification, email change) answer 404: recovery keeps its one path.
- Labels codePrompt and signInWithCode in all six languages.

Real-database tests (PGlite) cover sign-in, a code working once, three
wrong tries, the second factor, the closed endpoints and a mailer without
codes; the browser check covers the field at 320 and 390px in en and de.

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

* build: commit dist for the sign-in code

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-11-02 22:18:42 +01:00
CatoandClaude b732b55506 feat(screens): a product that owns the person's name keeps the panel out of it (#69)
Vita's profile edits the patient's name on `users`, the row every table and
every clinician reads. AccountPanel's Profile section edits auth_users.name,
so on one page a patient had two name fields writing two rows that drift.
`ownProfile` leaves that section out; the rest of the panel stays.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 21:57:08 +01:00
CatoandClaude b25e5858ca feat(auth): a product that must keep accounts can turn self-service deletion off (#65)
Vita, a clinic, keeps medical records for ten years under Swiss law: its
patients request erasure from a clinician (a tracked thread), and the portal
has no delete button. Adopting AccountKit's account panel would have given
them one, and /delete-user would have taken the sign-in away from records
the clinic must keep.

- accountDeletion: false (createAuthRuntime, createAuthInstance) turns
  better-auth's deleteUser off: /delete-user answers 404 and deletes nothing.
- AccountPanel takes `deletion`, the product's own way out (such as a link to
  its erasure request), shown in place of the delete control beside
  "Sign out".

Both have regression tests: the endpoint refuses with every row and the
session intact, and the panel renders the product's node, not the control.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 21:31:18 +01:00
CatoandClaude 5108725c4c feat(auth): the shared sign-in's button names only the providers Morulia publishes (#64)
signInMethods reads <SIGNIN_ISSUER>/api/providers (cached per issuer,
refreshed at most once a minute, last good list kept) and returns the
names as signinProviders; signin is true only when one is listed. The
label is composed from them in all six languages, so an app never names
a provider that is not configured. The fallback label drops Apple and X,
which are paid.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 21:13:41 +01:00
CatoandClaude c259b5506e fix(screens): a button label never cuts a hyphenated word across lines (#60)
At 390px evig's sign-in card read "Stattdessen einen Anmeldelink per E- /
Mail schicken": a browser may break after any hyphen, and no CSS property
forbids it. Every button label on AccountKit's screens now keeps each
hyphenated word in a nowrap span (inline style, so it holds without the
stylesheet), in every language and in a product's own labels. Spaces still
wrap, and the accessible name is unchanged.

The browser check renders the sign-in card with every method on, in every
shipped language at 320 and 390px, lays each hyphenated word of each button
out in a Range and fails when it spans two lines. Without the fix it fails
on fr ("par e- / mail") and ru. chatkit's findBrokenWords exempts a break
beside a hyphen by design, so it cannot see this case.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 09:41:09 +01:00
Cato d528260d49 feat(auth): CJS ./auth/password and one new-password field on reset (0.9.1) (#37)
* feat(auth): CommonJS build of ./auth/password; reset form asks for the new password once, in the same field as sign-up

* feat(auth): PasswordField as its own entry for products with their own pages

* fix(styles): the eye's room applies to any input in the box

* feat(auth): ./auth/hash, bcrypt over SHA-256 with verify-and-rehash of old hashes

* feat(auth): PasswordField accepts name and placeholder
2026-10-28 03:54:02 +01:00
Cato 44741a334e feat(auth)!: one password rule everywhere (non-empty, up to 128), no hint text (#33) 2026-10-28 02:04:27 +01:00
CatoandClaude 5dcc30d7c7 feat(auth): one password field at sign-up, with the eye inside it (#29)
0.7.2 asked for the password twice and put a full-width 'Show password'
bar between the fields and the button, which read as a third action. The
owner asked for sign-up without friction (2026-10-26). Seeing what you
typed is what the repeat field was for: the show/hide control is now an
eye inside the password field (two new class slots, inputWrap and
reveal, styled on --acct-* tokens, a 44px target), and sign-up has one
password field. Password reset keeps its repeat field, where a typo
locks the person out.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-26 21:38:22 +01:00
Cato 8be5afe442 feat(auth): confirm registration passwords and support visibility controls (#26) 2026-10-26 17:36:47 +01:00
CatoandClaude bd881cd851 feat(auth): sign up with an email and a password, nothing else (v0.7.0) (#23)
The sign-up screen asked for a display name, demanded a 12-character
password and drew an 'or with email' divider under nothing whenever a
product had no providers switched on. Owner, 2026-10-26: just let people
register.

- No display-name field; an account starts nameless (displayNameFor shows
  the address until the person picks a name on the account page).
- One password rule: at least 8 characters (MIN_PASSWORD_LENGTH, shared by
  the server, the form and every translation).
- The divider appears only under the buttons it separates.
- The link option reads 'Email me a link instead'.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-26 16:32:22 +01:00
Cato d9c311e54f fix(auth): enforce enabled second factors across primary sign-in methods (#19) 2026-10-25 20:54:49 +01:00
Cato b9c2f314a4 feat(auth): complete password recovery and mail capability (v0.6.0) (#12) 2026-10-25 09:24:09 +01:00
CatoandClaude 7a41667ab0 fix(auth): AccountPanel accepts better-auth's real twoFactor.enable result (#7)
Claude-Session: https://claude.ai/code/session_01QDMxjTqKNLXETMYYuapMa3

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 09:51:39 -07:00
CatoandClaude Opus 5.5 43fb3110fb feat(auth): shared sign-in, sign-up and account screens (v0.4.0) (#6)
* feat(auth): shared sign-in, sign-up and account screens (auth/react, v0.4.0)

Logic in the package, words and look from the product: labels (English
default) and classes (acct-auth-* defaults on --acct-* variables).

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

* feat(auth): fall back to AUTH_SECRET so a product moving off next-auth needs no new secret

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 09:35:31 -07:00