Skip to content

Ft/auth seeders and tests#158

Merged
Joel-Joseph-George merged 20 commits into
ft/betterauth-migrationfrom
ft/auth-seeders-and-tests
May 14, 2026
Merged

Ft/auth seeders and tests#158
Joel-Joseph-George merged 20 commits into
ft/betterauth-migrationfrom
ft/auth-seeders-and-tests

Conversation

@kaseywright
Copy link
Copy Markdown
Contributor

This PR addresses shortcomings and brings enhancements to the BetterAuth implementation.

kaseywright and others added 20 commits May 13, 2026 12:00
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>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nner in setup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Accepted domain for the instance should be set in ENV
@Joel-Joseph-George Joel-Joseph-George merged commit 30ee8b3 into ft/betterauth-migration May 14, 2026
@github-actions github-actions Bot deleted the ft/auth-seeders-and-tests branch May 14, 2026 04:47
Joel-Joseph-George added a commit that referenced this pull request May 15, 2026
* Chnages associated with migrating the authentication from auth0 to Better Auth

* Lint fix

* modifying the env example file

* removing unwanted comments from the documentation

* Ft/auth seeders and tests (#158)

* 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>

---------

Co-authored-by: Kasey Wright <kasey@kaseywright.com>
Co-authored-by: kaseywright <kasey.wright@biblionexus.org>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants