Skip to content

fix(security): upgrade better-auth to 1.7.15 - #244

Open
santoshkumarradha wants to merge 1 commit into
mainfrom
santosh/fix-better-auth-1-7-849b
Open

santoshkumarradha wants to merge 1 commit into
mainfrom
santosh/fix-better-auth-1-7-849b

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Summary

Monday’s scheduled security run on main (6d15d0f) failed pnpm audit --audit-level=high --prod on three better-auth advisories. 1.6 has no backport; the patch floor is 1.7.7. This PR upgrades dashboard and customer-app to 1.7.15 and completes the 1.7 client migration that Dependabot was previously blocked on.

Advisories:

Changes

  • Pin better-auth to 1.7.15 in both apps and pnpm.overrides
  • Replace signIn.oauth2({ providerId }) with signIn.social({ provider }) and drop genericOAuthClient()
  • Remove issuer / requireIssuerValidation from generic OAuth config (1.7 validates via discovery)
  • Rewrite /api/auth/oauth2/callback/:id → /api/auth/callback/:id so already-registered IdP URIs still land
  • Document the new callback URIs; lift the Dependabot ignore from >=1.7.0 to >=1.8.0

The core user / session / account / verification schema is unchanged on 1.7.3+ (we never ran 1.7.0–1.7.2), so no runtime SQL migration is required.

Test plan

  • pnpm audit --audit-level=high --prod is clean (7 low/moderate only)
  • tsc --noEmit passes in dashboard and customer-app
  • CI green on this branch
  • After merge, operators who already registered /api/auth/oauth2/callback/enterprise-sso should also add /api/auth/callback/enterprise-sso — 1.7 sends the new redirect_uri on the authorize request

Notes for reviewers

This is a fix(security): commit so the next release includes the patched apps. Email/password and magic-link flows are unchanged; SSO is the only client API change.

Open in Web Open in Cursor 

The Nov 2 security cron failed on three better-auth advisories
(GHSA-965c-763c-88jm, GHSA-r4xp-prcw-77qf, GHSA-q84f-53jg-9ppm).
The patch floor is 1.7.7; 1.6 has no backport.

Migrate SSO from signIn.oauth2 / genericOAuthClient to signIn.social,
drop the removed issuer fields, and rewrite the old oauth2 callback
path so existing IdP redirect URIs keep working.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Santosh kumar <santoshkumarradha@users.noreply.github.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