Commit Graph
16 Commits
Author SHA1 Message Date
CatoandClaude 553d330843 feat(oauth): a client for every fleet sign-in page, given its secret on the box (#1523)
The owner's rule (2026-11-01): every fleet app offers every sign-in method,
"Continue with OrangeCat" included. Ten apps with a sign-in page had no
client: aoz-begleitung, biaslens, botsmann, diplodoctor, hirnli (on both
hosts), keller, kivvi, printcraft, reparaturbonus-zh and vitareba (vita and
vitareba hosts). They are now in client-specs.ts, identity-only.

Creating a client used to mean running register-client.ts on the box and
copying the printed secret by hand. Now the deploy's client SQL also creates a
missing row, switched off and with no secret: inert twice over (getClient
reads only enabled rows; verifyClientSecret rejects a null hash). loki
app-secrets.sh (kind oc-client, bitbaum/loki#1533) then writes the secret
into the app's env and its sha256 into the row, and switches it on, printing
neither. register-client.ts now mints a secret for such a row instead of
re-enabling it secretless.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 21:55:29 +01:00
CatoandClaude Fable 5.1 cbf8296b92 feat(oauth): an app may list a service in your name — the fee of a builder booked through Loki (#1366)
* feat(oauth): an app may list a service in your name; the fee of a builder booked through Loki

Track 3 of Loki's docs/master-plan-2026-10.md, the OrangeCat half: a builder
booked on someone's project is paid through a service in the builder's own
name, listed by Loki with the builder's token, paid to the builder's wallet.

- `service.write` scope, sensitive, on the consent screen like timeline.write.
  Loki's ceiling carries it; every other client stays identity-only.
- CLIENT_SPECS moves to scripts/oauth/client-specs.ts (pure) so two readers
  share it: register-client.ts by hand, and the deploy, which now refreshes the
  scope ceiling of every REGISTERED client right after the migrations
  (client-scopes-sql.ts → box psql). It creates nothing: a missing client is
  still registered by hand, where its secret is printed once. A scope widened
  in the code used to reach the live sign-in only when someone re-ran the
  registration on the box.
- createService honours a validated `active` status (a fee Loki lists has
  nobody to press Publish); paused/unavailable still cannot be created.
- The settled-payment signal to Loki fires for a service bought outright, not
  only for project funding, so the booking is marked paid from the payment.
- product, service, cause and document creates carry the resolved actor
  (withResolvedActor): a type argument on createEntity<Row>( had hidden these
  four from the check that pins the carrier; the check now sees past it.

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

* fix(ci): align the playwright CLI with @playwright/test so the browser install matches

#1362 bumped @playwright/test to 1.64.1 and left `playwright` at 1.62.1, so
`pnpm exec playwright install chromium` fetched 1.62.1's browser while the
test runner looked for 1.64.1's headless shell (1248): build-and-smoke has
been red on main since, and on every PR. One package, one version.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 13:07:41 +02:00
CatoandClaude 53e3eb70de OAuth: register Causius as an identity-only relying party (#1309)
Claude-Session: https://claude.ai/code/session_012EJFFkKhmaVnnH8E3mHnaZ

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-11 12:25:55 -07:00
CatoandClaude Opus 5.5 dff47e2143 feat(oauth): evig, petvity, surf-your-life and datacat sign in with OrangeCat (#1211)
George moved every own product to Sign in with OrangeCat. Identity scopes
only; each keys users on sub and links no account by email while GoTrue
auto-confirms sign-ups. policy/tos only where the page exists (curl-checked).

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 04:41:19 -07:00
CatoandClaude Opus 5.5 c8bc3d6e15 feat(oauth): consent screen says which account, how long, and what is risky (#1208)
Compared against X's "Authorize app" screen, ours listed scopes more
precisely but left out five things a person needs before clicking Allow:

- Which account: "Signed in as <name> · @user · email" with "Not you?"
  (signs out and returns to this same request via the sign-in hand-off).
- How long + undo: "until you remove it", linked to Settings → Connected
  apps; OrangeCat's Terms and Privacy linked. Links open in a new tab so
  the request is not abandoned.
- Risky permissions first: OAUTH_SCOPES gains `sensitive` (every write/act
  scope plus wallet.read and messages.read), listed under a warning heading.
- The app's own privacy policy / terms: new oauth_clients.policy_uri /
  tos_uri (additive migration). /oauth/register accepts the RFC 7591
  fields, https only; a bad link is dropped, never a refusal. Loki gets
  both, Heidi privacy only (the pages that exist). Without them the screen
  says the app has published neither.
- Redirect host now shown for verified apps too, not only self-registered.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 08:33:52 -07:00
CatoandClaude Opus 5.5 ae714712fa fix(oauth): Substrata in the client SSOT, with both of its origins (#1207)
Substrata was registered by hand and never written into CLIENT_SPECS, so a
re-run had nothing to refresh. It moves to substrata.ch and the
orangecat.ch address keeps working, so both callbacks are allowed. Applied
to the live row the same day (scopes unchanged; trusted like Heidi/Solon).

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 05:27:32 -07:00
CatoandClaude Fable 5.1 2077bfc207 feat(auth,docs): developer page for "Sign in with OrangeCat"; passkeys (#1185)
* feat(docs): developer page for "Sign in with OrangeCat" + round-trip script

Step D9 of ADR-0009. OrangeCat has been a real OpenID Connect provider
since June and five relying parties sign people in through it, but a site
that wanted the button had the standard and nothing else.

/docs/sign-in-with-orangecat: what you get (one identity keyed by sub,
passwords optional, people can disconnect you), self-service registration
with its rules, the Auth.js config Solon/Heidi/Loki run and the by-hand
authorize/token/userinfo/refresh calls, button wording (prompt=create,
login_hint), sessions and what invalid_grant means, and every scope with
its consent-screen wording. Every URL, scope and lifetime is derived from
the provider's own config (snippets.ts), and a unit test pins the snippets
to the discovery document, so the page cannot quote an endpoint the server
does not serve.

scripts/oauth/sign-in-roundtrip.mjs registers a client, opens the sign-in,
catches the code on loopback, exchanges it with PKCE, checks iss/aud/nonce,
reads userinfo, refreshes, and proves the spent token is refused — the
same steps any relying party takes, runnable before writing a line.

Linked from /docs. ADR-0009 status updated: D1–D4 shipped, relying parties
now honour revocation (solon#203, heidi#145).

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

* fix(docs): userinfo snippet uses a shell variable for the token

gitleaks (curl-auth-header) reads 'Bearer THE_ACCESS_TOKEN' as a leaked
token; $ACCESS_TOKEN is what a person would paste anyway.

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

* chore(security): allowlist the docs bearer-token placeholder for gitleaks

The developer page's userinfo example used 'Bearer THE_ACCESS_TOKEN', which
gitleaks' curl-auth-header rule reads as a leak. The tree now uses a shell
variable; the placeholder in history is allowlisted instead of rewriting it.

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

* feat(auth): passkeys — add/list/remove in settings, sign in with a passkey

Step D5 of ADR-0009. The self-hosted auth server (GoTrue) supports WebAuthn
passkeys and the browser client already carries the ceremony; what was
missing was the UI, the wrapper, and the switch.

- Settings → Security → Passkeys: the person's passkeys with name, date and
  last use; "Add a passkey" (browser prompt, then named); remove.
- /auth: "Sign in with a passkey" beside the emailed code — nothing typed.
- Both are hidden until the auth server reports passkeys_enabled: true
  (lib/auth/passkeys-availability reads GoTrue's public settings, cached
  five minutes, fails closed). A button that cannot work is a dead end.
- docs/operations/passkeys.md is the switch: GOTRUE_PASSKEY_ENABLED and the
  relying-party id/origins, with why the id is orangecat.ch and not the
  API host. scripts/auth/passkeys-e2e.mjs drives add → sign in → remove
  with Chromium's virtual authenticator and exits 2 while the switch is off.

services/supabase/auth/passkeys.ts wraps registerPasskey / passkey.list /
update / delete / signInWithPasskey in the auth service's shape; a passkey
is named in a second call and a failed rename still returns a working key.
Unit tests cover the availability parser and the wrappers.

Also: the two CLI scripts under scripts/ carry the no-console pragma their
siblings use.

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

* fix(scripts): throwaway inbox password from crypto.randomBytes

CodeQL (js/insecure-randomness) flags Math.random() for a password, even
a disposable one; the real generator costs nothing.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-29 02:45:52 -07:00
CatoandClaude Opus 5.5 2faf0db7cf feat(oauth): register Skif as an identity-only relying party (#1142)
Skif is bitbaum's safety product (skif.orangecat.ch): bookable Protectors
and safety assessments. Per fleet STACK.md it federates to OrangeCat and
keeps no users table; `sub` is the only identity key it stores.

Same ceiling as Heidi and Solon: `openid profile email`, confidential
(Auth.js v5 server keeps the secret), trusted first-party. Deliberately
nothing wider: Skif holds bookings, incident reports and people's stated
safety limits, so it must not be able to read or act on anything else here.

After merge, run on the box:
  ORANGECAT_OWNER_SEED=1 npx tsx scripts/oauth/register-client.ts --client skif

Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 22:16:26 -07:00
CatoandClaude Fable 5.1 483cb9e0d6 refactor: one definition per concern, and slugs that survive a non-Latin name (#1059)
* refactor(lib): one sanitizeApiKey and one escapeHtml, with tests

Two helpers that touch security-relevant material had drifted into copies:

- sanitizeApiKey existed five times (transcribe route, groq, openai-compat,
  openrouter, health probes). It stands between a pasted credential and an
  Authorization header, so it now has one definition in src/lib/api-key.ts
  and a test. health-probes wanted the "did anything get stripped?" answer,
  which is sanitizeApiKeyChecked over the same regex rather than a sixth one.
- escapeHtml existed four times across the email templates — the injection
  guard between a user-supplied name and an inbox. It is now exported once
  from templates/layout.ts, which all three callers already import.

No behaviour change: the regex and the replacement chain are byte-identical
to what every copy did.

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

* refactor(utils): one home for the display formatters that had drifted

Four helper names were declared in three or four files each. Consolidated,
with every call site printing byte-for-byte what it printed before — pinned
by __tests__/unit/lib/display-formatters.test.ts.

- formatDate x4 -> src/utils/dates.ts, which already owned one of them.
  The three copies were three DIFFERENT formats, so the module gained the
  two it was missing rather than flattening them: formatDateLong ("July 22,
  2026") for article datelines, and formatIsoDay for 'YYYY-MM-DD' strings.
  formatIsoDay keeps the changelog's deliberate property of never building a
  Date: a calendar date has no timezone, and `new Date('2026-07-22')` is UTC
  midnight, which renders the day before west of Greenwich and renders it
  differently on the server than in the browser.
- formatTimestamp x3 (identical) -> formatDateTimeOrDash in utils/locale.ts,
  next to the formatDateTime it wrapped. The two row components took it as a
  prop from their parent; they import it instead, so the prop is gone.
- formatCountdown x3 -> src/utils/countdown.ts. These were not one helper
  that drifted but three formats sharing a name — 45 seconds read as "45s",
  "1m" or "0:45" depending on which file you imported from. They keep their
  three behaviours under names that say what they print.
- readJson + errorMessage x3 in the browser payment clients -> the
  unwrapApiResponse that src/lib/api/client-response.ts already exports, and
  whose docblock warns about exactly these hand-rolled copies drifting.

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

* fix(slug): slugify transliterates, so a non-ASCII name is not deleted

`slugify()` filtered to ASCII, which does not mean "strip accents" — it means
"delete every letter that is not ASCII". `Café Genève` became `caf-genve`,
`Grüße` became `gre`, and a Cyrillic or Japanese name produced the EMPTY
STRING. Under a unique constraint an empty slug means the second such record
cannot be saved at all, and the first one is addressed by a slug that
identifies nobody — walked live on 2026-09-11, `Марина` became
/profiles/someone and @someone.

That was already known and already fixed, but in domain/profileClaims only:
it kept its own `transliterate` and wrapped the broken slugify with it. Group
creation, the Cat's organization handler and the entity create form all still
went through the unwrapped path. So the transliteration moves into
`slugify()` itself — German digraphs first (ß has no decomposition and would
otherwise vanish), then NFKD plus a combining-mark strip for everything that
decomposes, then a Cyrillic table for the script that does not. claimSlugFor
keeps only what is specific to a claim: the person-<random> fallback.

Also in this commit, same concern:
- groups' `generateSlug` was `(name) => slugify(name)` — an alias, deleted;
  its one caller calls slugify, with a 'group' fallback so an unslugabble
  name cannot become the empty slug that ensureUniqueSlug would then extend.
- slugify with randomSuffix no longer returns a slug starting with a dash
  when the base is empty.
- scripts/cli/create-entity.ts deleted: a dead twin of create-entity.js,
  which is what `pnpm run create-entity` actually runs, carrying a third
  generateSlug. knip already listed it as unused.
- formatAmount: the real implementation inside <CurrencyDisplay> moves to
  services/currency/formatting.ts as formatAmountSuffixed. Output is
  unchanged — it is deliberately not formatCurrency(), which prefixes BTC
  with ₿ where every card in the app suffixes the ticker.

Tests: __tests__/unit/lib/slugify.test.ts covers the accented, German and
Cyrillic cases plus the ASCII behaviour that must not have moved.

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

* refactor: say the repeated blocks once — chat types, footer, Esplora readers

Three places where the same thing was written out two to five times.

- The Cat's tool-call vocabulary (ToolCallResultRef, ToolCallEvent,
  PrefillProposal) was defined twice: once by the pipeline that emits it and
  once by the panel that renders it, 55 lines of discriminated union that had
  to agree with nothing making them. The panel now re-exports the service's
  types. Type-only, so nothing enters the bundle. The two copies had already
  drifted: the service carries `handle?` on a result ref (the citation handle
  the UI needs to link the right source) and types `entityType` as the entity
  union rather than `string`.

- <Footer> wrote out the same seventeen-line link column five times, and only
  two of the five carried the external-link branch — so which columns could
  hold an external link was an accident of which had been copied last. One
  <FooterColumn>. Renders identically: only `ecosystem` has external items
  today.

- The Bitcoin service listed mempool.space and blockstream.info with
  byte-identical processBalance and processTransactions, 60 lines each. They
  both serve the Esplora API, so there is one reader for each now — one place
  for the satoshi arithmetic instead of one place to fix it and another to
  leave wrong.

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

* refactor(timeline): the feed envelope is written once, not fourteen times

Six feed functions across four files each spelled out the same three things
by hand: the page window, the success envelope, and — twice per function,
once for "no rows" and once for the catch — the empty envelope. Twenty
copies of the same twenty-line object literal, which is why userFeeds.ts was
the most-duplicated file in the repo (9 clones, 184 duplicated lines).

The cost was not the lines. A field added to TimelineFeedResponse had to be
remembered in all twenty places, and the ones that forgot it still compiled;
`hasNext` was computed from `offset + limit` in fourteen separate
expressions, any one of which could be edited alone.

queries/feed-shape.ts now owns pageWindow(), feedResponse() and emptyFeed().
What differs between the feeds — which rows they fetch, and the RPC or view
they fetch them from — stays in each file, which is the part that was ever
worth reading.

Two behaviours that looked accidental were kept deliberately and documented
rather than "tidied":
- emptyFeed echoes the requested limit WITHOUT clamping it to MAX_PAGE_SIZE.
  There are no rows for it to bound, and three call sites did exactly this.
- emptyFeed with no pagination reports page 1: the early returns that never
  read their arguments (no session, follows nobody) did that, and the numbers
  are what the UI paginates on.

userFeeds.ts 407 -> 281 lines, profileFeeds 87 -> 54, projectFeeds 122 -> 89,
communityFeeds 94 -> 61, plus 95 shared. Existing timeline tests pass
unchanged (62 files, 601 tests).

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

* refactor: extract the preludes that PUT/DELETE and five seed scripts repeated

Five more places where the same block was written out twice or five times.

- entityCrudHandler's PUT and DELETE each carried the same thirty lines:
  authenticate, load the row, run the ownership check. Now
  authorizeEntityMutation(), taking the verb and the optional per-entity
  access check. A change to the 401, the not-found copy or the ownership rule
  could previously land on update and not on delete — and delete is the half
  where getting it wrong is permanent.

- /api/projects/[id]/favorite: POST and DELETE both throttled the write,
  loaded the project and looked up the existing favourite. One helper in
  lib/api/projectFavorites.ts. It is called rateLimitedFavoriteContext for a
  reason, spelled out in its docblock: api-route-guards.test.ts reads route
  SOURCES for evidence of a write quota, and a helper called loadX would have
  hidden that evidence behind an import — the gate goes quiet while the
  protection is still there, which is the shape of a gate that later goes
  quiet when it is not.

- messaging/api-helpers.server.ts declared ActorRow, GroupMembershipRow and
  GroupActorRow twice, 27 lines apart-but-identical. TypeScript merges
  identical interfaces, so it compiled and nobody noticed.

- The group-activity and re-engagement email templates each wired their
  config into emailLayout + emailPlainText by hand. One renderEmail() in
  layout.ts.

- Five owner-gated operational scripts opened with the same thirty lines:
  load .env.local, read the service-role key, refuse without
  ORANGECAT_OWNER_SEED=1, build an admin client. These run against the LIVE
  database with a key that bypasses RLS, so that gate is the only thing
  between a stray `npx tsx` and production — not a check to keep in five
  versions. scripts/lib/owner-gate.ts owns it; the client it returns carries
  its own supabaseUrl so the two scripts that print which database they are
  about to write to still can.

Also: webhook signature verification stays duplicated between the app and
packages/sdk, because the SDK ships to customers and cannot import from src/,
and the app should not take a build dependency on a customer-facing package.
What is new is that the copy can no longer drift silently:
__tests__/unit/services/webhook-signature-parity.test.ts drives BOTH through
the same vectors — replay, forged body, bumped timestamp, wrong secret,
truncated and non-hex signatures, multi-signature rotation — and fails if
they ever disagree. Both files now say so at the top.

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

* test(slug): the assertions that pinned the limitation the fix removes

#1051 landed NFKD for slugify while this branch was in flight, and its tests
pinned what NFKD alone cannot do: `slugify('Марина') === ''`, and an article
titled in Cyrillic slugging to the literal word "article". Both were true,
both were documented as "callers transliterate first" — and this branch moves
that transliteration into slugify, so neither is true any more.

Updated rather than deleted, because the cases are the interesting ones: they
now assert 'marina' and 'shcherbakov', plus the sharp s that NFKD deletes
('Straße' → 'strasse', not 'strae'). The fallback assertion survives where it
still applies — a title with no letters at all.

The two slug test files are merged into the one that came with #1051; keeping
a second file for the same function would have been the thing this branch is
about.

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-15 13:53:38 -07:00
CatoandClaude Fable 5.1 9a352d3646 refactor: rename FleetCrown to Loki across the integration (#1016)
The sibling product was renamed on 2026-09-14. Every reference follows:
service and route paths (src/services/loki, /api/integrations/loki),
env keys (LOKI_*), the build-intent audience and timeline source ('loki'),
ecosystem config, docs, tests, and 13 file names.

Tool labels keep "Loki" capitalised: the old name had an internal capital
and passed the "looks like a name" shape test for free; a one-word name
needs listing, so softLower now carries a small PROPER_NOUNS set.

Box and data were moved ahead of this: LOKI_* keys sit beside the old ones
in the app env, the OAuth client is `loki` with the new callback host, and
timeline/metadata rows carrying the old name were rewritten.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 16:40:27 -07:00
CatoandClaude Opus 5 90864f7cca feat(oauth): register Heidi as an OIDC relying party (#977)
Heidi (heidi.orangecat.ch) teaches Swiss German. Its portal needs
learners, tutors who can be paid, and study groups — identity, economy
and public presence, every one of which OrangeCat already owns.

So Heidi follows Solon's shape rather than FleetCrown's: identity
scopes only, no capability grants. Heidi keeps no users table and acts
on nobody's behalf; it reads who you are and stops. That is the same
instruction the identity-bridge spec gives FleetCrown — do not rebuild
profiles here — applied to a second consumer.

Widen the scope ceiling in this file, deliberately, if tutor payouts
later need a wallet scope.

Register with:
  ORANGECAT_OWNER_SEED=1 npx tsx scripts/oauth/register-client.ts --client heidi


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 13:36:52 -07:00
35725fb929 refactor(oauth): CLIENT_SPECS registry + register Solon as the second relying party (#661)
OC1 (OrangeCat side) of the Solon v1 plan. register-client.ts hardcoded the
FleetCrown spec; a second relying party would have meant copy-pasting the
script. Extract CLIENT_SPECS — one least-privilege spec per client, selected
by --client (defaults to fleetcrown, preserving the original invocation and
the FleetCrown spec verbatim; re-run against prod confirmed: updated, secret
untouched).

New spec: solon — scopes `openid profile email` ONLY. Solon needs identity,
never OrangeCat agency: login links a Solon member to an OC actor
(Member.ocActorId), while governance authority flows the other way, through
Bitcoin-signed votes that OrangeCat re-verifies. Registered against prod;
secret handed to Solon's env out-of-band. The Solon-side NextAuth consumer
is the remaining half of OC1.

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 22:50:27 +00:00
Georgy ButaevandClaude Opus 4.8 cc4d40cdb0 feat(oauth): scripted, idempotent OIDC client registration
The FleetCrown oauth_clients row was previously inserted ad-hoc with no
committed tooling. Add scripts/oauth/register-client.ts as the SSOT for it:

- owner-gated (ORANGECAT_OWNER_SEED=1), runs against the self-hosted DB via
  the service-role admin client;
- idempotent upsert by client_id — refreshes non-secret fields every run so
  config drift is corrected, leaves the secret untouched unless --rotate;
- least-privilege FleetCrown spec (1 redirect, 7 scopes) validated against the
  OAuth scope registry SSOT (parseAndValidateScopes); FLEETCROWN_REDIRECT_URIS
  appends dev/preview origins;
- prints the plaintext secret once on creation/rotation for out-of-band handoff.

Mirrors the integration_keys hash+revocation model and the seed-script
convention (seed-revive-my-old-ride.ts).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 12:37:38 +02:00
Georgy ButaevandClaude Opus 4.8 054204e943 chore(infra): retire managed Supabase cloud; Hetzner self-host is SSOT
The managed Supabase Cloud project (ohkueislstxomdjavyhs) is retired; the
self-hosted instance at supabase.orangecat.ch on the Hetzner box is the single
source of truth. Repoint the image host + setup scripts, rewrite the agent/dev
guidance to use the self-host directly (not the Supabase MCP, which only reaches
the retired cloud), update active docs, exit retired cloud-Management-API
scripts behind a RETIRED guard, env-ify direct-connect scripts, gitignore
.env-backups, and add a founder-run DECOMMISSION-CLOUD runbook. No live code
path references the managed project anymore.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 09:26:58 +02:00
Your NameandClaude Opus 4.5 bcfb0aa8de security: remove all hardcoded secrets from scripts and docs
- Replaced 29 JWT tokens with environment variable references
- Deleted docs/operations/SUPABASE_API_GUIDE.md (contained real keys)
- Removed mcp-servers/node_modules from git tracking (716 files)
- Updated .gitignore to prevent future exposure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 13:11:53 +01:00
Your NameandClaude 2872828779 chore: version 0.1.1 deployment - fix configuration and dependencies
- Bump version to 0.1.1 for tracking
- Add webpack-bundle-optimizer script for Next.js config
- Simplify ESLint configuration to resolve missing dependencies
- Prepare for production deployment with proper version control

This deployment includes:
- Profile update fixes with banner_url support
- LN address validation
- Auth cookie fixes for profile updates
- Various documentation and testing improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 09:30:45 +02:00