To Reproduce
- Create backend using Svelte and configure better-auth with trustedOrigins on localhost
- Try to signup or do any action with better-auth
Current behavior
error Invalid origin: http://localhost:5173 []
info If it's a valid URL, please add http://localhost:5173 to trustedOrigins in your auth config
[
'Current list of trustedOrigins: http://localhost:5173,http://localhost:5173,http://localhost:5174,http://192.168.178.71:5173,http://192.168.178.71:5174'
]
Expected behavior
No error, the requests work.
What version of Better Auth are you using?
1.4.8
System info
The command npx @better-auth/cli info --json produces no output and results in exit code 1.
Which area(s) are affected? (Select all that apply)
Backend, every auth action
Auth config (if applicable)
import { betterAuth } from "better-auth"
export const auth = betterAuth({
trustedOrigins: [
'http://localhost:5173',
'http://localhost:5174',
'http://192.168.178.71:5173',
'http://192.168.178.71:5174'
],
emailAndPassword: {
enabled: true
},
});
Additional context
It didn't work in 1.4.7 or 1.4.6 either.
To Reproduce
Current behavior
Expected behavior
No error, the requests work.
What version of Better Auth are you using?
1.4.8
System info
The command
npx @better-auth/cli info --jsonproduces no output and results in exit code 1.Which area(s) are affected? (Select all that apply)
Backend, every auth action
Auth config (if applicable)
Additional context
It didn't work in 1.4.7 or 1.4.6 either.