Skip to content

GEN-2132: Replace Linear login with verified native Factorize accounts - #184

Draft
asselstine wants to merge 1 commit into
mainfrom
gen-2132-native-accounts
Draft

asselstine wants to merge 1 commit into
mainfrom
gen-2132-native-accounts

Conversation

@asselstine

Copy link
Copy Markdown
Collaborator

Factorize currently creates sessions through Linear OAuth and allows native signup without verifying email. This change makes username/password accounts the primary login, gates access on Postmark email verification, and adds single-use password recovery, password change and session revocation.

Linear OAuth now connects an integration to an authenticated Factorize workspace. Migration 0008 preserves existing tenants and encrypted connections, adds explicit webhook routing, and lets legacy Linear users establish native credentials through email recovery. Account/member authorization and OAuth state checks prevent cross-workspace claims. Documentation and deployment preflight cover the Postmark server token, verified sender and transactional stream.

Validation:

  • npm run build:css and AUTH_TEST_DATABASE_URL=... npm run check passed: 236 tests (including 12 real PostgreSQL auth-flow tests), 2 Postmark preflight tests, API boundaries, TypeScript, and app/tail-relay Worker dry runs. Eight existing optional database tests remain skipped in the normal check.
  • Every migration applied in disposable PostgreSQL, including a legacy account/connection fixture before migration 0008.
  • An additional optional job-edit PostgreSQL test fails with queue_full; reproduced unchanged on main at 84f88ed. It is unrelated to this change. The new auth suite has its own database setting.

Draft / remaining acceptance criterion: live production Postmark validation is unavailable in this VM. Reflection provides no Postmark integration, and auth:validate-email correctly fails closed for missing configuration. An operator must configure production GitHub environment secrets POSTMARK_SERVER_TOKEN, POSTMARK_FROM_EMAIL, and POSTMARK_MESSAGE_STREAM, then run the documented preflight with the production HTTPS APP_ORIGIN and confirm the preflight email. The deploy workflow performs that check before migrations and installs the same settings as Worker secrets. No deployment or live email send was performed.

Migration notes: case-insensitive duplicate legacy emails must be reconciled if the unique-index migration rejects them. Existing users with several owner memberships currently open their oldest workspace; no workspace switcher is added.

Tracks GEN-2132. Keep the issue In Progress until production email validation succeeds.

@linear

linear Bot commented Sep 20, 2026

Copy link
Copy Markdown

GEN-2132

This branch has not been deployed

No deployments
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