chore: set baseURL in better auth
This commit is contained in:
parent
50d6e2b069
commit
0585fb3253
@ -5,8 +5,6 @@
|
||||
# For development, set to http://localhost:3000 or any other port
|
||||
# -----------------------------------------------------------------------------
|
||||
NEXT_PUBLIC_BASE_URL="http://localhost:3000"
|
||||
# If your development port is not 3000, please set PORT to your port, e.g. 3005
|
||||
PORT=3000
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Database
|
||||
|
@ -10,7 +10,7 @@ import { drizzleAdapter } from 'better-auth/adapters/drizzle';
|
||||
import { admin } from 'better-auth/plugins';
|
||||
import { parse as parseCookies } from 'cookie';
|
||||
import type { Locale } from 'next-intl';
|
||||
import { getUrlWithLocaleInCallbackUrl } from './urls/urls';
|
||||
import { getBaseUrl, getUrlWithLocaleInCallbackUrl } from './urls/urls';
|
||||
|
||||
/**
|
||||
* Better Auth configuration
|
||||
@ -20,6 +20,7 @@ import { getUrlWithLocaleInCallbackUrl } from './urls/urls';
|
||||
* https://www.better-auth.com/docs/reference/options
|
||||
*/
|
||||
export const auth = betterAuth({
|
||||
baseURL: getBaseUrl(),
|
||||
appName: defaultMessages.Metadata.name,
|
||||
database: drizzleAdapter(db, {
|
||||
provider: 'pg', // or "mysql", "sqlite"
|
||||
|
Loading…
Reference in New Issue
Block a user