stadtwerke/innungsapp/apps/mobile/lib/auth-client.ts

14 lines
373 B
TypeScript

import { createAuthClient } from 'better-auth/react'
import { magicLinkClient } from 'better-auth/client/plugins'
import Constants from 'expo-constants'
const apiUrl =
Constants.expoConfig?.extra?.apiUrl ??
process.env.EXPO_PUBLIC_API_URL ??
'http://localhost:3000'
export const authClient = createAuthClient({
baseURL: apiUrl,
plugins: [magicLinkClient()],
})