This commit is contained in:
Timo Knuth
2026-02-27 15:19:24 +01:00
parent b7f8221095
commit 253c3c1c6d
134 changed files with 11188 additions and 1871 deletions

View File

@@ -1,16 +1,12 @@
import { createAuthClient } from 'better-auth/react'
import { magicLinkClient } from 'better-auth/client/plugins'
import Constants from 'expo-constants'
import AsyncStorage from '@react-native-async-storage/async-storage'
import { getApiBaseUrl } from './api-url'
const apiUrl =
Constants.expoConfig?.extra?.apiUrl ??
process.env.EXPO_PUBLIC_API_URL ??
'http://localhost:3000'
const apiUrl = getApiBaseUrl()
export const authClient = createAuthClient({
baseURL: apiUrl,
plugins: [magicLinkClient()],
plugins: [],
fetchOptions: {
customFetchImpl: async (url, options) => {
const token = await AsyncStorage.getItem('better-auth-session')