-
Notifications
You must be signed in to change notification settings - Fork 46k
feat(platform): replace Supabase Auth with Better Auth #13330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 84 commits
Commits
Show all changes
85 commits
Select commit
Hold shift + click to select a range
43c7ae6
feat(backend): support JWKS-based JWT validation and drop Supabase se…
ntindle 39d47f3
feat(platform): replace Supabase auth with Better Auth embedded in th…
ntindle 98d74b5
ci+docs(platform): provision plain Postgres in CI and update docs for…
ntindle 24a7e78
chore: remove stray vitest cache committed from repo root
ntindle 6a3645f
fix(frontend): keep Better Auth server code out of client bundles
ntindle 3980bb0
fix(platform): address review findings on Better Auth migration
ntindle fbfc4cd
test(frontend): cover the Better Auth module (actions, config, email,…
ntindle 2315e5f
fix(backend): auto-create marketplace Profile in get_or_create_user
ntindle 0e34f2f
fix(backend): tolerate concurrent default-profile creation
ntindle e8980ed
fix(frontend): fail auth flows when production SMTP is unconfigured
ntindle f147790
fix(backend): upsert test-fixture profiles now that get_or_create_use…
ntindle 6deb6ac
test(frontend): unit-cover auth flow actions and routes
ntindle 498a3ae
fix(backend): distinguish username collisions from concurrent profile…
ntindle 177e8f2
fix(frontend): roll back the auth session when post-login provisionin…
ntindle 258ac54
test(frontend): cover rollbackSession
ntindle 5d0c369
fix(frontend): enable Better Auth email change for the settings page
ntindle d0e6267
refactor(libs): drop dead Supabase module and unused dependencies
ntindle e52f1a2
docs(platform): align setup docs with the Better Auth stack
ntindle 98230ee
merge: origin/dev into better-auth-migration
ntindle e4f92da
fix(libs): validate JWKS URL format and rekey the client on URL change
ntindle 0ec3867
merge: origin/dev into better-auth-migration (catch up)
ntindle 791ff21
feat(frontend): env-driven signup gating (allow-new-accounts + allowl…
ntindle fbd7b83
merge: origin/dev into better-auth-migration (catch up)
ntindle fa8abe3
merge: origin/dev into better-auth-migration (catch up)
ntindle 4a09fde
fix(frontend): bump nodemailer 9.0.1 + vitest 4.1.9 to clear Snyk vulns
ntindle 6a316c0
fix(frontend): revert vitest bump, keep nodemailer 9.0.1
ntindle 06cfc0e
merge dev into better-auth-migration (resolve profile-creation + auth…
ntindle f53d8fa
fix(backend): drop duplicate TestGetOrCreateUserProfile brought in by…
ntindle c1bd2be
merge: origin/dev into better-auth-migration (catch up)
ntindle f1550db
fix(backend): align user.py profile provisioning with dev (de-dup merge)
ntindle c8724a6
fix(frontend): logout now clears __Secure- cookies over HTTPS
ntindle 4131f1c
feat(platform): route Better Auth emails through the backend mailer
ntindle a773edb
refactor(platform): auth emails via JWKS service tokens, drop AUTH_EM…
ntindle 7309eca
refactor(backend): forward auth emails to the notification service
ntindle 32c90a8
Merge remote-tracking branch 'origin/dev' into better-auth-migration
ntindle bb12e72
fix(frontend): port merged tour-sidebar auth check to useAuth + sync …
ntindle b59eee1
Merge remote-tracking branch 'origin/dev' into better-auth-migration
ntindle a62e9f6
fix(backend): regenerate poetry.lock with poetry 2.2.1 to match CI
ntindle b9af56e
Merge remote-tracking branch 'origin/dev' into better-auth-migration
ntindle 7d0e7ac
fix(frontend): port EmptySession helpers test off @supabase/supabase-js
ntindle bf998bd
ci(platform): fail e2e loudly when rest_server never becomes healthy
ntindle cf8292c
Merge remote-tracking branch 'origin/dev' into better-auth-migration
ntindle aa6a899
fix(backend): address review — PII, HTML escaping, event-loop, LD cache
ntindle 7a1683b
test(frontend): fix duplicate signup/callback tests broken by the dev…
ntindle c40dbb4
fix(frontend): close OAuth-callback open redirect + review correctnes…
ntindle 9795f28
refactor(backend): trusted-origin allowlist for auth-email links (dro…
ntindle 0752b9f
fix(frontend): enforce 12-char password floor and converge platform e…
ntindle 86aa33b
fix(platform): address PR review — migration dedup, bridge hardening,…
ntindle d30a09f
fix(platform): address PR review — OAuth rollback, admin fail-closed,…
ntindle b5a778f
docs(platform): document JWKS transport-security caveat for self-hosters
ntindle 0b2c071
fix(backend/auth): require JWT_JWKS_URL; JWT_VERIFY_KEY now optional
ntindle 320d404
fix(backend/auth): repair autogpt_libs auth test suite + run it in CI
ntindle c149745
fix(frontend): mint backend JWT in-process to fix Copilot infinite-lo…
ntindle a7bf870
fix(backend): route feature-flag AuthUser lookup through DatabaseMana…
ntindle 39e09db
fix(frontend): restore change-email confirmation to the current addre…
ntindle 6461b39
fix(backend/auth): warn on cleartext JWKS transport; clarify config e…
ntindle 3c6540c
refactor(backend): group Better Auth models and mark updatedAt columns
ntindle 8cefacd
refactor(frontend): de-duplicate JWKS alg and callback tests; clarify…
ntindle 3771a29
ci+docs(platform): pin Postgres to 15 to match prod; fix upgrade guide
ntindle 03e1c98
refactor(backend): mount auth-email under /api/auth/email and name it…
ntindle 6e621f1
docs(frontend): name the built-in OAuth exchange in the callback rout…
ntindle 7ae417f
refactor(backend): use the db_accessors user_db() helper for the feat…
ntindle a0b4fa8
Merge branch 'dev' into better-auth-migration
ntindle 09e291b
fix(backend/auth): declare httpx so the autogpt_libs test suite insta…
ntindle d1fc1e7
fix(frontend): bound the SSR auth-token self-fetch; untrack Supabase …
ntindle 3d557fc
fix(frontend): stop caching backend JWTs across requests so revocatio…
ntindle 65b1877
fix(frontend): close backslash open-redirect in the auth ?next= guard
ntindle 4ab2d8a
fix(backend/auth): keep the blocking JWKS fetch off the event loop
ntindle 52f09f1
fix(backend): normalize default ports and validate trusted-origin pat…
ntindle e3dd470
fix(frontend): stop duplicate change-email sends, partial profile upd…
ntindle 5457440
fix(backend/auth): treat a missing role claim as an ordinary user, no…
ntindle a8e510d
fix(backend): point the websocket auth tests at the async token parser
ntindle 9b2f7f0
fix(frontend): don't consume the legacy cookie when the bridge can't …
ntindle 26955b1
Merge remote-tracking branch 'origin/dev' into better-auth-migration
ntindle 9652ee8
refactor(backend): rename transactional-email senders; fix operationI…
ntindle 7c1cf66
fix(backend/auth): extend migration grace to legacy asymmetric tokens…
ntindle b2acffe
fix(frontend): migrate Experts marketplace components off the removed…
ntindle b3ca9c8
refactor(platform): rename Better Auth tables to UserAuth* for clarity
ntindle 6ccbaf5
fix(backend/auth): fail fast on unviable JWKS transport config
ntindle 6fec991
fix(frontend): add tight response-start timeout to the API proxy
ntindle f62d7e7
refactor(platform): reword review-flagged comments to be timeless and…
ntindle fe68654
fix(frontend): point direct-upload test mock at the moved getWebSocke…
ntindle 861fc90
fix(frontend): OAuth waitlist rejections now match on the gate's body…
ntindle ce0136f
fix(frontend): break legacy-cookie redirect loop when the bridge secr…
ntindle ffc0264
Merge branch 'dev' into better-auth-migration
ntindle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: AutoGPT Platform - Supabase Auth Sweep | ||
|
|
||
| # Re-runs the GoTrue -> Better Auth user copy as an idempotent sweep. The | ||
| # bulk copy happens in Prisma migration | ||
| # 20260716120000_copy_supabase_users_to_better_auth during the normal deploy; | ||
| # run this once AFTER the frontend has switched to Better Auth to catch users | ||
| # who signed up via GoTrue in between. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| environment: | ||
| description: "Environment to sweep" | ||
| type: choice | ||
| required: true | ||
| options: | ||
| - develop | ||
| - production | ||
|
|
||
| permissions: | ||
| contents: "read" | ||
|
|
||
| jobs: | ||
| sweep: | ||
| environment: ${{ github.event.inputs.environment }} | ||
| name: Sweep GoTrue users into Better Auth | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| package_json_file: autogpt_platform/frontend/package.json | ||
|
|
||
| - name: Set up Node | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: "24.18.0" | ||
| cache: "pnpm" | ||
| cache-dependency-path: autogpt_platform/frontend/pnpm-lock.yaml | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: ./autogpt_platform/frontend | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Run sweep | ||
| working-directory: ./autogpt_platform/frontend | ||
| run: npx tsx scripts/migrate-supabase-auth.ts | ||
| env: | ||
| DATABASE_URL: ${{ secrets.BACKEND_DATABASE_URL }} | ||
|
ntindle marked this conversation as resolved.
|
||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.