push
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user