-
Notifications
You must be signed in to change notification settings - Fork 81
fix: Better Auth 1.4 support #183
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
base: main
Are you sure you want to change the base?
Conversation
I added support for 1.4 why leave the old version behind?
WalkthroughUpdated project dependencies including peer dependency better-auth from 1.3.34 to 1.4.5, refreshed multiple dev dependencies, added Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related issues
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (4)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the Convex plugin to support Better Auth version 1.4, addressing a breaking change where the passkey plugin was moved to a separate package @better-auth/passkey.
- Updates the passkey import from
better-auth/plugins/passkeyto@better-auth/passkey - Upgrades better-auth peer dependency from 1.3.34 to 1.4.5
- Updates numerous other dependencies to newer versions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/auth.ts | Updates passkey import to use the new @better-auth/passkey package per Better Auth 1.4 migration requirements |
| package.json | Adds @better-auth/passkey as a dependency, updates better-auth to 1.4.5, and updates multiple other dependencies to newer versions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "semver": "^7.7.3", | ||
| "type-fest": "^4.39.1", | ||
| "zod": "^3.24.4" | ||
| "type-fest": "^5.3.1", |
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type-fest version was updated from ^4.39.1 to ^5.3.1, which is a major version bump. Type-fest follows semantic versioning strictly, and major version updates can introduce breaking type changes that may affect the codebase.
Please verify that this major version update doesn't introduce any breaking changes that affect the usage of type-fest in this project.
| "concurrently": "^9.2.0", | ||
| "@types/node": "24.10.1", | ||
| "@types/react": "19.2.7", | ||
| "@types/react-dom": "19.2.3", |
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @types/react-dom version was updated from 18.3.7 to 19.2.3, which corresponds to React 19. However, the peerDependencies still allow React 18 (react-dom: ^18.3.1 || ^19.0.0). This version mismatch may cause type incompatibility issues for users on React 18.
Consider using @types/react-dom version ^18.3.7 to match the minimum supported React version.
| "@types/react-dom": "19.2.3", | |
| "@types/react-dom": "^18.3.7", |
| "react": "19.2.1", | ||
| "react-dom": "19.2.1", |
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The react version was updated from 18.3.1 to 19.2.1 in devDependencies. However, the peerDependencies allow both React 18 and 19 (^18.3.1 || ^19.0.0). While this isn't necessarily wrong, it's better practice to test with the minimum supported version to ensure compatibility.
Consider using React 18.3.1 in devDependencies to test against the minimum supported version, or clearly document that the package is primarily tested with React 19.
| "react": "19.2.1", | |
| "react-dom": "19.2.1", | |
| "react": "18.3.1", | |
| "react-dom": "18.3.1", |
| "pkg-pr-new": "0.0.62", | ||
| "prettier": "3.7.4", | ||
| "react": "19.2.1", | ||
| "react-dom": "19.2.1", |
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The react-dom version was updated from 18.3.1 to 19.2.1 in devDependencies. However, the peerDependencies allow both React 18 and 19 (^18.3.1 || ^19.0.0). While this isn't necessarily wrong, it's better practice to test with the minimum supported version to ensure compatibility.
Consider using React DOM 18.3.1 in devDependencies to test against the minimum supported version.
| "react-dom": "19.2.1", | |
| "react-dom": "18.3.1", |
| }, | ||
| "peerDependencies": { | ||
| "better-auth": "1.3.34", | ||
| "better-auth": "1.4.5", |
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The peerDependency for better-auth is pinned to an exact version 1.4.5 instead of using a version range (e.g., ^1.4.5 or ~1.4.5). This is overly restrictive and will cause installation failures if users have a different patch version of better-auth 1.4.x installed.
Consider using ^1.4.5 to allow compatible patch versions.
| "better-auth": "1.4.5", | |
| "better-auth": "^1.4.5", |
| "@types/react": "19.2.7", | ||
| "@types/react-dom": "19.2.3", |
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @types/react version was updated from 18.3.26 to 19.2.7, which corresponds to React 19. However, the peerDependencies still allow React 18 (^18.3.1 || ^19.0.0). Using React 19 types in devDependencies while supporting React 18 in peerDependencies may cause type incompatibility issues for users on React 18.
Consider using @types/react version ^18.3.26 to match the minimum supported React version, or if React 19 is required, update the peerDependencies to reflect that.
| "@types/react": "19.2.7", | |
| "@types/react-dom": "19.2.3", | |
| "@types/react": "^18.3.26", | |
| "@types/react-dom": "^18.3.11", |
The Convex plugin for BetterAuth 1.4 was bugged! If you updated all your dependencies to a higher version an error would occur when importing 'better-auth/plugins/passkey' because on 1.4 passkey became it own dependence at
@better-auth/passkey. The migration guide can be found at Better Auth Blog for 1.4.
Some codebases might need some changes for maximum compatibility but thats not an topic for this PR. And won't have any problems according to the guide.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.