fix(2fa): improve error handling and display for two-factor authentication setup

- Handle potential errors when enabling two-factor authentication
- Provide more detailed error messages for password verification
- Update client-side error handling to display specific error messages
- Add base URL configuration for non-cloud environments
This commit is contained in:
Mauricio Siu
2025-03-08 12:37:50 -06:00
parent b64ddf1119
commit a6de744f91
2 changed files with 6 additions and 3 deletions

View File

@@ -14,6 +14,9 @@ const { handler, api } = betterAuth({
provider: "pg",
schema: schema,
}),
...(!IS_CLOUD && {
baseURL: "http://localhost:3000",
}),
logger: {
disabled: process.env.NODE_ENV === "production",
},