BetterAuthConfig
Configuration options for Better Auth integration.
Properties
appleOAuth?
optionalappleOAuth?:BetterAuthOAuthProvider
Apple OAuth provider configuration.
basePath?
optionalbasePath?:string
Base path for Better Auth routes.
Default
"/api/auth"
baseURL?
optionalbaseURL?:string
Base URL for the auth server. If not provided, falls back to BETTER_AUTH_URL environment variable.
crossDomainCookies?
optionalcrossDomainCookies?:boolean
Allow credential cookies when the frontend and API are hosted on different sites.
Enables SameSite=None; Secure cookie attributes. Keep disabled for local HTTP.
enabled
enabled:
boolean
Whether Better Auth is enabled for this server.
githubOAuth?
optionalgithubOAuth?:BetterAuthOAuthProvider
GitHub OAuth provider configuration.
googleOAuth?
optionalgoogleOAuth?:BetterAuthOAuthProvider
Google OAuth provider configuration.
secret?
optionalsecret?:string
Secret key for Better Auth session encryption. If not provided, falls back to BETTER_AUTH_SECRET environment variable.
trustedOrigins?
optionaltrustedOrigins?:string[]
Trusted origins for CORS and redirect validation. Include your app's deep link schemes (e.g., "terreno://", "exp://").