Fixed Better Auth infra on local env

This commit is contained in:
Jose Selesan
2026-04-22 08:42:18 -03:00
parent 0fd72ea1de
commit 5f2a7fd494

View File

@@ -4,12 +4,16 @@ import { sentinelClient } from "@better-auth/infra/client";
const apiBaseUrl = api.apiBaseUrl;
const plugins = [
sentinelClient()
]
export const authClient = createAuthClient({
baseURL: apiBaseUrl,
fetchOptions: {
credentials: 'include',
},
plugins: [sentinelClient()],
plugins: import.meta.env.VITE_BETTER_AUTH_INFRA === 'true' ? plugins : [],
});
export class ApiClientError extends Error {