GEN-2132: Replace Linear login with verified native Factorize accounts - #184
Draft
asselstine wants to merge 1 commit into
Draft
asselstine wants to merge 1 commit into
asselstine wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:cssandAUTH_TEST_DATABASE_URL=... npm run checkpassed: 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.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-emailcorrectly fails closed for missing configuration. An operator must configure production GitHub environment secretsPOSTMARK_SERVER_TOKEN,POSTMARK_FROM_EMAIL, andPOSTMARK_MESSAGE_STREAM, then run the documented preflight with the production HTTPSAPP_ORIGINand 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.