Skip to content

feat(oauth): white-label headless OAuth — URL-less auth-recovery [WIP]#402

Draft
angel-manuel wants to merge 1 commit into
devfrom
feat/white-label-headless-oauth
Draft

feat(oauth): white-label headless OAuth — URL-less auth-recovery [WIP]#402
angel-manuel wants to merge 1 commit into
devfrom
feat/white-label-headless-oauth

Conversation

@angel-manuel

Copy link
Copy Markdown
Contributor

Context (WIP — draft to preserve work)

White-label / BYOC orgs (e.g. Overfolder) run the OAuth dance against their own client and vault tokens via POST /v1/connections/import. The problem is auth-recovery: when an action hits a connection needing re-auth (reauth_required, needs_authentication, missing_scopes), Overslash mints a gated /connect-authorize URL requiring an Overslash dashboard session. A white-label org's end users never have one → white-label violation.

Approach

Delete integration_managed and split the two conflated axes:

  • Refresh axis — structural: pinned byoc_credential_id self-refreshes; no stored boolean.
  • Flow-ownership axis — new per-org headless capability. Headless org → auth-recovery returns URL-less typed envelopes (no gate), mints no flow row. Non-headless → unchanged gated flow.
  • Imports must pin byoc_credential_id (400 otherwise).

Status

🚧 Incomplete WIP committed to avoid losing recovered work.

Done so far:

  • Migration 084_orgs_headless (per-org headless flag)
  • Migration 085_drop_connection_integration_managed
  • DB layer: drop integration_managed, add org headless get/set
  • platform_connections import derivation changes

Remaining:

  • Regenerate sqlx offline cache (make sqlx-prepare)
  • Error envelopes (error.rs): URL-less variants with headless discriminator
  • Auth-recovery branches (actions/auth.rs): suppress URL mint for headless orgs
  • Require BYOC on import (400), remove integration-managed token path
  • Admin API for headless flag (routes/orgs.rs)
  • Integration tests (tests/headless_oauth.rs)
  • Docs (SPEC, DECISIONS, design doc, STATUS, CHANGELOG)

Cross-repo follow-up

overfolder consumes the envelope — coordinated PR needed to swap integration_managedheadless and drop the dead connection.refresh_required handler.

🤖 Generated with Claude Code

… axes

Recovered WIP for URL-less auth-recovery for white-label / BYOC orgs.

- migration 084: orgs.headless flag (per-org capability)
- migration 085: drop connections.integration_managed (split conflated axes)
- DB layer changes for org headless flag + drop integration_managed field
- platform_connections import derivation changes

Incomplete — sqlx cache not yet regenerated, error envelopes + auth-recovery
branches still pending. Committed to preserve work before continuing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
overslash Ready Ready Preview, Comment Jun 17, 2026 7:39am

Request Review

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