23 lines
745 B
TypeScript
23 lines
745 B
TypeScript
import { createAuthClient } from 'better-auth/react';
|
|
import { expoClient } from '@better-auth/expo/client';
|
|
import { organizationClient } from 'better-auth/client/plugins';
|
|
import { passkeyClient } from '@better-auth/passkey/client';
|
|
import * as SecureStore from 'expo-secure-store';
|
|
|
|
/**
|
|
* Better Auth client for Expo
|
|
* Configured with: expoClient (scheme: bagsy, secure storage), organization, passkey plugins
|
|
*/
|
|
export const authClient = createAuthClient({
|
|
baseURL: process.env.EXPO_PUBLIC_API_URL || 'http://localhost:3001',
|
|
plugins: [
|
|
expoClient({
|
|
scheme: 'bagsy',
|
|
storagePrefix: 'bagsy',
|
|
storage: SecureStore,
|
|
cookiePrefix: 'better-auth',
|
|
}),
|
|
organizationClient(),
|
|
passkeyClient(),
|
|
],
|
|
});
|