"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>
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>
An AccountMenu item or group may carry shown: "always" | "narrow"
(default "always"), and extra has the same choice as extraShown. A narrow
row is in the menu below 768px only: hidden by the package stylesheet in a
media query (no width read in script, right on the server render and the
first paint), skipped by the arrow keys, and a hidden group takes its
divider with it.
For a row that repeats a control the header carries from md up, such as
OrangeCat's theme toggle, which its menu also showed as "Appearance".
Claude-Session: https://claude.ai/code/session_019MDtmvT2nQyPBK4EfWf3Rn
Co-authored-by: Claude <noreply@anthropic.com>
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.
* feat(menu): AccountControl, a panel that stays on screen, remote session read
A consumer gets, from the browser-safe "." entry:
- AccountControl: one header control for loading (an inert box the
trigger's size), signed out (one 44px "Sign in" link) and signed in
(AccountMenu, unchanged), plus accountSignInHtml({ href, label }), the
same signed-out markup byte for byte for a static page.
- fetchAccountSummary(url, { signal?, fetch?, timeoutMs? }): a
credentialed, no-store GET of a session held on another origin that
resolves null on any failure and never rejects, including an injected
fetch that returns something that is not a Response. timeoutMs (default
8000; 0, negative or Infinity turns it off) bounds the whole read, body
included, combined with the caller's signal (AbortSignal.any where
available, by hand otherwise), so a stalled server cannot leave a header
loading for ever and the header fails closed to "Sign in".
- returnPath, the same-origin path guard, no longer only behind the
server-only ./orangecat entry.
Fix: the open panel ran off the screen when the trigger was not last in its
row (-112px at 390 in Bitbaum's header). The menu now measures the open
panel and moves it inside only when it crosses an edge; a last trigger's
panel is unchanged. It is measured again while open on a window resize and,
without one, when the panel or its header row (nearest flex or grid
ancestor) or a control in that row changes size, or a control is added to
or removed from the row (ResizeObserver and MutationObserver, feature
detected, disconnected on close and unmount).
Checked by pnpm run verify: browser checks at 320 and 390, light and dark,
on four demo rows (a 44px control before or after the trigger, both
aligns), which failed on the old stylesheet; with the menu open, a 44px
control added after the trigger, and the existing one widened, without a
window resize (left -47px at 320 before); render tests comparing
AccountControl with accountSignInHtml and AccountMenu, escaping hostile
input; unit tests for fetchAccountSummary with an injected fetch (non-
Response values, a fetch and a body that never settle, the 8000ms default
under mock timers, the caller's abort with a timeout armed, the fallback
without AbortSignal.any, Infinity) and for returnPath from ".". The browser
check honours CHROMIUM_PATH. dist/orangecat.d.ts only shows a union
reordered by the compiler, not a source change.
Claude-Session: https://claude.ai/code/session_019MDtmsSWTTpVpe4wh3v1sb
* fix(menu): the panel is moved in layout, so nothing scrolls sideways
The pull request's own browser check failed in CI and passed locally:
with the panel open in the two `align="start"` demo rows the page
scrolled sideways by 186px and 242px, at 320 and 390 wide, while the
panel itself measured inside the screen. CI runs Chromium 156; the local
run was Chromium 153. The panel was moved back on screen with
`translate`, and the page still counted the place it had come from.
What a consumer gets: the panel is moved on the edge it is pinned by, in
layout (`inset-inline-start` or `inset-inline-end` take `--acct-shift`).
A box laid out inside the screen cannot make the page scroll in any
browser. The move follows the text direction: in a right-to-left page
the pinned edge is the other one, and the offset changes sign with it.
How it is checked: test/browser.mjs opens the four demo rows again with
the page set right to left, at 320 and 390px, light and dark, and asserts
the panel is inside the viewport and nothing scrolls sideways. The
existing left-to-right checks are unchanged. `pnpm run verify` passes on
Chromium 153; CI decides for 156.
Claude-Session: https://claude.ai/code/session_019MDtmsSWTTpVpe4wh3v1sb
---------
Co-authored-by: Claude <noreply@anthropic.com>
An account in accounts may carry waiting, a count of what waits there
(unread messages, notifications). It is shown at the end of that account's
row, capped at 99+, and as a dot beside the trigger, so a person knows
before opening the menu. The trigger's accessible name says so too.
- Zero, absent or not a positive number shows nothing; so does a count with
no onSwitchAccount, because there is nowhere to go.
- The dot sits beside the trigger, not in it: the trigger clips to keep a
photo round and would clip the dot with it.
- The count and the dot are the text colour inverted, not the accent, which
the fleet keeps for Bitcoin and for the action that brings someone in.
- A long name truncates before the count instead of pushing it off the row.
Claude-Session: https://claude.ai/code/session_019MDtmubu4vMeqp2pdae1Zy
Co-authored-by: Claude <noreply@anthropic.com>
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>
One person can hold several accounts: OrangeCat's identities are the first
case. The other accounts are listed under who is signed in, and a tap
switches.
- New optional props accounts ({ id, user, note? }) and onSwitchAccount(id).
A row is a face (photo, initials from the name, or a glyph), the name, and
one line with the note and the handle. The note leads so it survives a long
handle; another account's email is never shown.
- Same failure contract as sign-out: the row says it is switching, and a
switch that rejects keeps the menu open and says it did not complete.
- The rows are menu items, so arrows, Home and End reach them.
- Without the new props the menu renders exactly as before.
Browser suite: listed under a heading, 44px rows, a long name and handle
keep the panel on a 390px and a 320px screen, keyboard reach, a failed
switch, a completed one.
Claude-Session: https://claude.ai/code/session_019MDtmubu4vMeqp2pdae1Zy
Co-authored-by: Claude <noreply@anthropic.com>
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>
0.26.0's lightningClient() named better-auth's own fetch type, which went into
the published declaration. In BiasLens, whose better-auth resolved another
@better-fetch/fetch, authClientPlugins() was no longer assignable to
createAuthClient's plugins and the typecheck failed. The plugin types its one
call by shape; a test keeps better-fetch names out of the declaration and a
type test compiles a product's own wiring.
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>
* 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>
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>
Causius, diplodoctor and keller kept their own account mailers for one
reason: their mails are in the reader's language, with HTML. evig wrapped the
shared mailer to send its own 6-digit confirmation. Neither could get the
sign-in code without copying more of the package.
createAuthMailer now takes `render(kind, url, extra)` (subject, text, html;
`codes: true` when it prints extra.code) and `own` (the product's own mail
for one kind, falling back to the shared one when it cannot send). The
origin check, the transport and the code stay here. It also skips addresses
that cannot receive mail, as those products did.
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>
* 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>
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>
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>
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>
0.22.1 kept each hyphenated word in a nowrap span beside the rest of the
label. A flex button (AccountKit's own stylesheet, and evig's) lays each
child text node and span out as its own flex item, so evig's sign-in card
now read "Stattdessen einen / Anmeldelink per | E-Mail | schicken" in three
columns, live at 390px: no word cut, but no sentence either.
The parts now sit in one span, which is one flex item and wraps as text.
The browser check lays out every word of every button label in every
shipped language at 320 and 390px and fails when a word starts above or
left of the one before it. It fails on de, gsw, fr and it without the fix.
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>
0.22 switched GitHub sign-in on whenever GITHUB_CLIENT_ID and
GITHUB_CLIENT_SECRET were set. Those variables often hold an app a product
acts on repositories with and never chose as a way in: Loki's is exactly
that, and on 0.22 it offered a GitHub button it does not want.
The product now asks for it: createAuthRuntime({ githubSignIn: true }).
The runtime carries the choice, and nextauth-compat reads it from there,
so AccountKit's endpoints and the provider list cannot disagree. Without
it, neither offers GitHub and nothing is asked of GitHub. The regression
test fails on 0.22.1.
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>
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>
Loki has had a registered GitHub OAuth app since before AccountKit, and
its GitHub sign-in (with the repo and workflow grant its project flows
act with) waited on the bitbaum sign-in getting provider credentials.
GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET now bring that app across as
it is, at its existing callback; githubScopes adds the product's own
scopes; the compat layer offers it to next-auth/react, for sign-in and
for linking. The token goes to onAccountCreated, never to AccountKit's
table.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
A first email sign-in link creates the person without a sign-in method, so
onAccountCreated (which ran as a method was attached) never ran for them and
a product had no row for that person. A user create hook now reports such a
person once, as soon as they exist, with providerId NO_SIGN_IN_METHOD; a
person who already has a method was reported as it was attached, so the hook
reaches every new person exactly once.
onAccountDeleted({ userId, email }) runs once a person's account is deleted,
so a product removes or anonymises its own row. A product's refusal before
/delete-user still stops the deletion before anything is deleted, and the
hook is not called then.
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>
A product that has moved to AccountKit's screens (SignInForm, SignUpForm,
AccountPanel) and retired its own credential writers still has pages calling
next-auth/react for useSession and signOut, and its session shape (roles on
its own rows) comes from the compat layer. Until now the compat route closed
sign-up, magic link, passkeys, two-factor and recovery, so a product could not
offer them without dropping its session shape. With screens: "accountkit"
every AccountKit endpoint passes through to the runtime; the default stays
"product".
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>
A first OrangeCat sign-in in evig, loki, petvity and surf-your-life failed
with unable_to_create_user: their onAccountCreated writes the product's
row, its mirror trigger records the same link in auth_accounts, and the
row better-auth stores next collided with it. That record, for the same
person, now gives way. onAccountCreated also receives the provider's
tokens (decrypted) for a product that keeps them itself, as Loki must to
publish to OrangeCat.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
better-auth 1.7 serves generic OIDC providers through /sign-in/social,
/link-social and /callback/<id>; /sign-in/oauth2 no longer exists, so
every OrangeCat sign-in through the compat layer answered "unavailable"
on the products that switched. The callback is open only for the
product's OIDC providers. A journey test runs the whole round-trip against
a synthetic issuer, now shared with the second-factor test.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
evig, kivvi, petvity, surf-your-life and loki each defined the same
`AUTH_RUNTIME === "accountkit"` check. @bitbaum/accountkit/auth/switch
exports it once as sharedRuntimeEnabled(env), free of dependencies so a
proxy or a provider gate can ask without loading the runtime.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
A product's credentials resolver reads its own database (an account lock,
the address behind an invite id). If that throws, the compat layer now
answers the `unavailable` refusal, mapped to the product's own login code,
instead of a 500 that next-auth/react cannot read. onSignedIn and onRefused
failures are logged and never cost the person the sign-in or the refusal.
evig's own copy of the bridge caught these; the shared one now does too.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
Five products (evig, kivvi, petvity, surf-your-life, loki) each carried a
copy of the same bridge from next-auth/react to the shared runtime, the same
rollback-only rehearsal script and the same journey-test cookie client. They
now live here once.
- auth/nextauth-compat: createNextAuthCompat answers session (GET and POST),
csrf, providers, signout, each credentials callback and signin/<oidc> for
every configured OIDC client, sign-in or link when signed in, plus a
same-origin GET entry for server-side signIn. Only what the screens use is
open; AccountKit's own credential writers answer 404. The product supplies
its session shape, credentials resolvers (an address or a refusal code),
login codes and hooks; it gets sessionFor, sessionIdFor and currentSession.
A signed-out session reads as null, never {}.
- auth/import-rehearsal + the accountkit-rehearse-import command: a
product's import SQL in one transaction that always rolls back, reported
as counts, through the product's pg or postgres driver.
- auth/compat-testing: a cookie-keeping client that speaks what
next-auth/react sends.
test/nextauth-compat.test.js runs them on PGlite with the real runtime.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
Add `legacyPassword: { matches, verify }` beside `legacyBcrypt`, on the
server and the Next runtime. A product that stored its own format (Loki's
hand-rolled scrypt `hex.salt`) imports its hashes as they are; `matches`
claims a hash by shape and is asked first, `verify` checks it. New and
changed passwords are native scrypt, as with bcrypt.
test/legacy-format-runtime.test.js: own-format and bcrypt people sign in on
one runtime, wrong passwords are refused, and a password change leaves the
old format for native scrypt.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
Every bitbaum product needs people in and using it with as little friction as
possible. With mail configured, AccountKit used to refuse a password sign-in
until the address was confirmed, and a first-password claim gave no session
until the link was followed.
Now, by default, a sign-up is signed in at once and is mailed a confirmation
link. An unconfirmed account signs in, and a claim signs the person in and
mails the link. Following the link still sets emailVerified, which a product
reads to reserve powers (staff, payouts) for confirmed addresses.
A product that needs the wall opts in with emailConfirmation:
"before-sign-in" (server, Next runtime, and signInMethods' third argument).
It applies only with mail, as before.
Claude-Session: https://claude.ai/code/session_019MDtmuvj9Cecd7DR2Nbirb
Co-authored-by: Claude <noreply@anthropic.com>
`ids: "uuid"` on createAuthInstance and createAuthRuntime makes every id the
runtime mints a random UUID. A product whose own rows reference people by a
uuid column (evig's `users`) can then give a person AccountKit creates itself
(a first OIDC sign-in, its own sign-up) a product row under the same id in
onAccountCreated. Without it those ids are better-auth's own strings and can
never match. Stored ids are untouched and the default is unchanged.
Claude-Session: https://claude.ai/code/session_019MDtmuvj9Cecd7DR2Nbirb
Co-authored-by: Claude <noreply@anthropic.com>
* Trust a product's further hosts in the origin check
Hirnli serves sign-in on its platform host and on tenant hosts. With one
pinned origin, every tenant-host sign-in was refused as INVALID_ORIGIN.
site.trustedOrigins lists the others; each keeps its own host-only cookie,
and mail links and passkeys still use site.url.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
* Let a product pass its further hosts as a lookup
Hirnli keeps its tenant hosts as rows (org_domains), so a list fixed at
startup would refuse a host added later until a restart. A failed lookup
trusts only site.url.
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>
Hirnli runs better-auth with the organization plugin for workspaces and
cannot move onto AccountKit without it. `plugins` mounts a product's own
plugins after AccountKit's; tables in `schema` beyond the standard six are
handed to the adapter by model name. The shared methods and rules stay
AccountKit's.
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>
Products that came from NextAuth already have `users`, `accounts` and
`sessions` (Vitareba: 31 tables reference users.id), so AccountKit's
tables could not be added beside them. createAuthTables(prefix) builds
the same tables under a prefix; pass them as `schema`. The default
exports are unchanged and generate identical SQL.
The 0.12.0 changelog entry now carries its version.
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>
better-auth refreshes every session to one shared lifetime, so a product
that needs a stricter rule for some people (AOZ staff on 8 hours) could
not keep it: a shorter expiry written from outside was undone on the next
request. sessionLifetime(userId) takes the refresh over for the people it
names: idle past the limit ends the session, activity slides it at most
hourly, and the 14-day refresh no longer applies. Everyone else keeps
the default.
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>
Products that created people before they had a password (an invitation,
a login code) can now hand the credential lifecycle to AccountKit:
POST /api/auth/provision/claim gives that identity its first password
under its existing user id. A second identity joins an existing account
only on that account's own password; an invited account without one must
recover through its mailbox first. Verified addresses are never moved,
.invalid addresses are refused, single-use proofs are given back on
failure, and with mail configured an unverified address gets a link, not
a session.
A completed password reset now verifies the address it was sent to when
that address is unchanged, so an imported or invited account with an
unverified address is not refused at sign-in after recovering.
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>
* 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
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>
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>