Migration: Auth0 to Better Auth#157
Merged
Merged
Conversation
…-server into ft/betterauth-migration
kaseywright
reviewed
May 13, 2026
Contributor
There was a problem hiding this comment.
This PR looks pretty good. Only minor things were found. Some enhancements for ease of local development were needed.
We should still test that the migration of PROD users will go smoothly before pushing to PROD.
I have created a PR to address the current comments and other issues found during review. You, @Joel-Joseph-George , feel free to merge that PR and adapt anything else you might find.
@vipinpaul can approve this branch merging into main
* fix: check auth_user for duplicate email in create-user script * Add limit(1) to duplicate-check queries in create-user script Both the auth_user and users duplicate-check queries now explicitly specify limit(1) to optimize queries on UNIQUE-indexed columns. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: replace logger with console in dev scripts * refactor: export seedRoles function from roles seed * refactor: export seedRbac function from rbac seed * feat: add organizations seed * feat: add dev-users seed with extensible config and env var fallbacks Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: add transaction and username check to dev-users seed * fix: move idempotency checks inside transaction in dev-users seed * feat: add db:setup orchestrator script * docs: add seed env vars to .env.example * fix: transaction in create-user, limit(1) in set-password, dynamic banner in setup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: update fapi.sh db:seed and db:init to use new setup command db:seed now runs all four seeds (org, roles, RBAC, dev-users) via npm run scripts. db:init delegates to npm run db:setup instead of manually chaining individual steps. Updates Auth0 reference in setup message. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * update default credentials * format * format * fix: bring fapi.ps1 db:seed and db:init to parity with fapi.sh Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: set cookie expire and domain to be ENV driven * remove unneccessary cors domains. Accepted domain for the instance should be set in ENV * update eslint.config to mute warning for dev script --------- Co-authored-by: kaseywright <kasey.wright@biblionexus.org> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
vipinpaul
approved these changes
May 15, 2026
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.
Closes #87