mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Ready for 1.1.3-rc.3 release.
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
"use client"
|
||||
import {createAuthClient} from "better-auth/react";
|
||||
|
||||
import {adminClient, inferAdditionalFields, organizationClient} from "better-auth/client/plugins";
|
||||
import {env} from "@/env.mjs";
|
||||
import {ac, user, admin as adminRole, pending, superadmin, orgAdmin, orgMember, orgOwner} from "./permissions";
|
||||
import {auth} from "@/lib/auth/auth";
|
||||
|
||||
const baseURL =
|
||||
typeof window === "undefined"
|
||||
? process.env.PROJECT_URL // server side
|
||||
: "";
|
||||
|
||||
const res = await fetch(`${baseURL}/api/config`);
|
||||
const { PROJECT_URL } = await res.json();
|
||||
|
||||
export const authClient = createAuthClient({
|
||||
baseURL: env.NEXT_PUBLIC_PROJECT_URL,
|
||||
baseURL: PROJECT_URL,
|
||||
plugins: [
|
||||
organizationClient({
|
||||
ac,
|
||||
|
||||
@@ -191,7 +191,7 @@ export const auth = betterAuth({
|
||||
},
|
||||
},
|
||||
},*/
|
||||
trustedOrigins: [env.NEXT_PUBLIC_PROJECT_URL!, "http://app"],
|
||||
trustedOrigins: [env.PROJECT_URL!, "http://app"],
|
||||
});
|
||||
|
||||
/*export const signUpUser = async (email: string, password: string, name: string) => {
|
||||
|
||||
Reference in New Issue
Block a user