fix: a bunch of fixes

This commit is contained in:
Bereket Engida
2024-09-16 22:06:27 +03:00
parent c945d1ba95
commit 044ba402cc
29 changed files with 1159 additions and 281 deletions

View File

@@ -1,11 +1,30 @@
import { createAuthClient } from "better-auth/react";
import { organizationClient, passkeyClient, twoFactorClient } from "better-auth/client/plugins"
import {
organizationClient,
passkeyClient,
twoFactorClient,
} from "better-auth/client/plugins";
export const client = createAuthClient({
plugins: [organizationClient(), twoFactorClient(), passkeyClient()],
fetchOptions: {
credentials: 'include'
}
plugins: [
organizationClient(),
twoFactorClient({
twoFactorPage: "/two-factor",
}),
passkeyClient(),
],
fetchOptions: {
credentials: "include",
},
});
export const { signUp, signIn, signOut, useSession, user, organization, useListOrganizations, useActiveOrganization } = client;
export const {
signUp,
signIn,
signOut,
useSession,
user,
organization,
useListOrganizations,
useActiveOrganization,
} = client;