Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/mail/lib/auth-client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { customSessionClient, phoneNumberClient } from 'better-auth/client/plugins';
import { phoneNumberClient } from 'better-auth/client/plugins';
import { createAuthClient } from 'better-auth/react';
import type { Auth } from '@zero/server/auth';

Expand All @@ -7,7 +7,7 @@ export const authClient = createAuthClient({
fetchOptions: {
credentials: 'include',
},
plugins: [customSessionClient<Auth>(), phoneNumberClient()],
plugins: [phoneNumberClient()],
});

export const { signIn, signUp, signOut, useSession, getSession, $fetch } = authClient;
Expand Down
6 changes: 2 additions & 4 deletions apps/mail/lib/auth-proxy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { customSessionClient } from 'better-auth/client/plugins';
import { createAuthClient } from 'better-auth/client';
import type { Auth } from '@zero/server/auth';

const authClient = createAuthClient({
baseURL: import.meta.env.VITE_PUBLIC_BACKEND_URL,
fetchOptions: {
credentials: 'include',
},
plugins: [customSessionClient<Auth>()],
plugins: [],
});

export const authProxy = {
Expand All @@ -17,7 +15,7 @@ export const authProxy = {
fetchOptions: { headers, credentials: 'include' },
});
if (session.error) {
console.error(`Failed to get session: ${session.error}`);
console.error(`Failed to get session: ${session.error}`, session);
return null;
}
return session.data;
Expand Down
1 change: 0 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"outputs": ["build/**", "!.react-router/**", "dist/**"]
},
"dev": {
"dependsOn": ["db:studio"],
"persistent": true,
"cache": false
},
Expand Down