Fixed Better Auth infra on local env
This commit is contained in:
@@ -4,12 +4,16 @@ import { sentinelClient } from "@better-auth/infra/client";
|
|||||||
|
|
||||||
const apiBaseUrl = api.apiBaseUrl;
|
const apiBaseUrl = api.apiBaseUrl;
|
||||||
|
|
||||||
|
const plugins = [
|
||||||
|
sentinelClient()
|
||||||
|
]
|
||||||
|
|
||||||
export const authClient = createAuthClient({
|
export const authClient = createAuthClient({
|
||||||
baseURL: apiBaseUrl,
|
baseURL: apiBaseUrl,
|
||||||
fetchOptions: {
|
fetchOptions: {
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
},
|
},
|
||||||
plugins: [sentinelClient()],
|
plugins: import.meta.env.VITE_BETTER_AUTH_INFRA === 'true' ? plugins : [],
|
||||||
});
|
});
|
||||||
|
|
||||||
export class ApiClientError extends Error {
|
export class ApiClientError extends Error {
|
||||||
|
|||||||
Reference in New Issue
Block a user