chore(auth): upgrade better-auth 1.3.12 → 1.6.11#4766
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryHigh Risk Overview API renames: Auth behavior tweaks: Email: OTP templates/subjects add Data: Migration Reviewed by Cursor Bugbot for commit 5a8b8ab. Configure here. |
Greptile SummaryThis PR upgrades
Confidence Score: 5/5Safe to merge — all changes are additive migrations or API renames with no destructive database operations and no behavioral regressions on critical auth paths. Every changed file corresponds directly to a documented better-auth 1.6 migration step. The oneTimeToken expiry correction fixes a latent bug where tokens lived 60 days instead of 24 hours. The database migration is purely additive. Previously raised concerns about freshAge and OTP type coverage have been addressed in follow-up commits. No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "fix(auth): correct oneTimeToken expiresI..." | Re-trigger Greptile |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6d360b4. Configure here.
Better-auth's oneTimeToken expiresIn is in minutes (multiplied by 60_000ms internally). Sim's existing 24*60*60 evaluated to ~60 days of token lifetime instead of the intended 24 hours. Tokens are one-time-use and typically consumed within seconds of generation (Socket.IO handshake), so this tightens an unused security window without affecting UX.
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 5a8b8ab. Configure here.
Summary
better-auth,@better-auth/sso,@better-auth/stripefrom 1.3.12 → 1.6.11onEmailVerification→afterEmailVerification,forgetPassword→requestPasswordReset,organizationCreation.afterCreate→organizationHooks.afterCreateOrganizationnextCookies()to end of plugins array (1.6.10 fix — earlier position droppedSet-Cookieheaders from later plugins'hooks.after)requireLocalEmailVerifieddefault to preserve OAuth-linking behaviorrequireEmailVerificationOnInvitationonisEmailVerificationEnabledso self-hosted invite flow still works without SMTPfreshAge: 0(1.6 recalculates freshness fromcreatedAt, not last activity)getCheckoutSessionParamsline_itemsoverride (1.6.10 strips it; pre-checkout seat picker already exists)pagesconfig (never a valid option) and unusedsignIn/signUpre-exports0216_*adds 6 nullable columns for new better-auth Stripe + JWKS fieldsType of Change
Testing
type-checkandcheck:api-validationclean/api/auth/get-session,/api/auth/jwks,/api/auth/forget-password, OIDC discovery — all 200ADD COLUMNonly — no destructive opsFollow-up (separate PR)
oidcProvider→@better-auth/oauth-providermigration — requires data migration of live OAuth client rows + one-wayclient_secrethashing. Plan documented in.context/better-auth-upgrade/OAUTH-PROVIDER-MIGRATION.md.Checklist