-
-
Notifications
You must be signed in to change notification settings - Fork 154
refactor(auth): update better auth to 1.4 #686
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
Conversation
🦋 Changeset detectedLatest commit: 340ba07 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Deploying papra-demo with
|
| Latest commit: |
340ba07
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c461f01e.papra-demo.pages.dev |
| Branch Preview URL: | https://better-auth-1-4.papra-demo.pages.dev |
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 better-auth library from version 1.3.34 to 1.4.6 and implements enhanced authentication configuration security by enforcing proper AUTH_SECRET validation, particularly in production environments.
Key Changes:
- Updated better-auth and @better-auth/expo from 1.3.34 to 1.4.6
- Implemented production-safe AUTH_SECRET validation with a minimum 32-character requirement
- Renamed
forgetPasswordtorequestPasswordResetto align with better-auth 1.4 API changes
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Updated catalog versions for better-auth packages to 1.4.6 |
| pnpm-lock.yaml | Updated lock file with new better-auth 1.4.6 dependencies, including peer dependency changes (removed expo-crypto and expo-secure-store as required, added expo-network as optional) |
| apps/papra-server/src/modules/config/config.ts | Replaced lodash memoize with memoizeOnce from @corentinth/chisels; added validation logic for auth secret in production |
| apps/papra-server/src/modules/config/config.models.ts | Added exitProcessDueToConfigError and validateParsedConfig utility functions for configuration validation |
| apps/papra-server/src/modules/app/auth/auth.errors.ts | Added createAuthSecretIsDefaultError for production auth secret validation |
| apps/papra-server/src/modules/app/auth/auth.constants.ts | Defined DEFAULT_AUTH_SECRET constant for development environments |
| apps/papra-server/src/modules/app/auth/auth.constants.test.ts | Added test to ensure default auth secret meets 32-character minimum |
| apps/papra-server/src/modules/app/auth/auth.config.ts | Updated auth secret configuration with enhanced documentation and 32-character minimum requirement |
| apps/papra-server/src/modules/app/auth/auth.config.models.ts | Added ensureAuthSecretIsNotDefaultInProduction validation function |
| apps/papra-server/src/modules/app/auth/auth.config.models.test.ts | Added tests for production auth secret validation |
| apps/papra-client/src/modules/auth/pages/request-password-reset.page.tsx | Renamed forgetPassword to requestPasswordReset |
| apps/papra-client/src/modules/auth/auth.services.ts | Renamed forgetPassword to requestPasswordReset to match better-auth 1.4 API |
| apps/papra-client/src/modules/auth/auth.demo.services.ts | Renamed forgetPassword to requestPasswordReset in demo client |
| .changeset/few-peaches-peel.md | Documented the production AUTH_SECRET validation requirement |
| .changeset/fast-schools-pay.md | Documented the 32-character minimum requirement for AUTH_SECRET |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8c0a283 to
ab31ce9
Compare
Deploying papra-docs with
|
| Latest commit: |
340ba07
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4412ae54.papra-2op.pages.dev |
| Branch Preview URL: | https://better-auth-1-4.papra-2op.pages.dev |
Deploying papra-client with
|
| Latest commit: |
340ba07
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b2c951e9.papra.pages.dev |
| Branch Preview URL: | https://better-auth-1-4.papra.pages.dev |
ab31ce9 to
340ba07
Compare
No description provided.