Skip to content

feat(auth,deploy): seamless OIDC-to-passkey auto-upgrade and passkey-first TinyCloud defaults - #96

Merged
itz4blitz merged 2 commits into
mainfrom
feat/passkey-auto-upgrade-tinycloud
Nov 30, 2026
Merged

itz4blitz merged 2 commits into
mainfrom
feat/passkey-auto-upgrade-tinycloud

Conversation

@itz4blitz

Copy link
Copy Markdown
Collaborator

What changed and why

Members migrating from Pocket ID (or another OIDC provider) to TinyServer's built-in passkeys no longer need the owner to manually generate and DM one-time claim links. When sign_in_methods is any, signing in through the provider automatically prompts members without a passkey to create one right inside the callback tab (with a "Skip for now" fallback) before returning to tinyclient, and POST /v1/me/passkeys/link skips the 10-minute recent_sign_in_required gate for a member's first passkey so one-click in-app setup works from any active session.

New TinyCloud tenants created with deploy/tenant/tenant.sh now default to built-in passkeys only (compose.passkey.yml), direct reverse proxy ingress (compose.proxy.yml with per-tenant TINYSERVER_HTTP_PORT, no Cloudflare tunnel), sealed E2EE attachments (scan-off.yml), and minimal logging (compose.nologs.yml), and server panics / fatal errors now pass through log_policy::redact_value.

Type

  • feature
  • fix
  • perf
  • refactor
  • chore
  • docs

Clients

  • windows
  • macos
  • linux
  • android
  • ios

Proof

Scenario: e2e/scenarios/passkey-auto-upgrade

Lab run:

Compatibility

Older tinyclient releases work unchanged: /v1/auth/callback handles the browser passkey upgrade flow transparently before redirecting to the loopback callback, and POST /v1/me/passkeys/link keeps its existing request/response contract. Existing deploy/compose.yml stacks (Pocket ID + Cloudflare tunnel) remain unchanged unless the opt-in overlays or tenant.sh defaults are used.

Migrations

  • crates/db/migrations/0062_passkey_upgrade.sql — adds 'upgrade' to passkey_ceremonies's kind CHECK constraint and adds app_passkey_upgrade_peek(bytea) (SECURITY DEFINER, granted to app_runtime).
  • Rollback:
    DROP FUNCTION IF EXISTS app_passkey_upgrade_peek(bytea);
    DELETE FROM passkey_ceremonies WHERE kind = 'upgrade';
    ALTER TABLE passkey_ceremonies DROP CONSTRAINT passkey_ceremonies_kind_check;
    ALTER TABLE passkey_ceremonies ADD CONSTRAINT passkey_ceremonies_kind_check
      CHECK (kind IN ('signup', 'login', 'recover', 'claim', 'continue'));

Risk and rollback

Low risk: if starting an upgrade ceremony fails during OIDC callback, the server logs a warning and falls through to issuing the auth code directly so sign-in is never blocked. Rollback by reverting this PR / deploying the previous image and running the 4-line SQL rollback above if needed.

@itz4blitz
itz4blitz merged commit 73150d7 into main Nov 30, 2026
4 checks passed
@itz4blitz
itz4blitz deleted the feat/passkey-auto-upgrade-tinycloud branch November 30, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant