Initial commit: expo-popcore-app
This commit is contained in:
27
lib/auth.ts
Normal file
27
lib/auth.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { createAuthClient } from "better-auth/react";
|
||||
import { usernameClient, phoneNumberClient, emailOTPClient, genericOAuthClient, adminClient, organizationClient, jwtClient } from 'better-auth/client/plugins'
|
||||
import * as SecureStore from "expo-secure-store";
|
||||
import { expoClient } from "@better-auth/expo/client";
|
||||
|
||||
import loomartPlugin from './plugins/loomart-plugin';
|
||||
export const authClient = createAuthClient({
|
||||
baseURL: "http://localhost:14333/api/auth",
|
||||
trustedOrigins: ["duooomi://"],
|
||||
storage: SecureStore,
|
||||
scheme: "duooomi",
|
||||
plugins: [
|
||||
loomartPlugin(),
|
||||
usernameClient(),
|
||||
phoneNumberClient(),
|
||||
emailOTPClient(),
|
||||
genericOAuthClient(),
|
||||
jwtClient(),
|
||||
adminClient(),
|
||||
organizationClient(),
|
||||
expoClient({
|
||||
storage: SecureStore
|
||||
})
|
||||
],
|
||||
});
|
||||
|
||||
export const { signIn, signUp, signOut, useSession, $Infer, loomart, admin } = authClient;
|
||||
Reference in New Issue
Block a user