feat(frontend): Add organization creation, deletion, add better-auth organization plugin
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
import { createAuthClient } from 'better-auth/vue'
|
||||
import { organizationClient } from 'better-auth/client/plugins'
|
||||
|
||||
export const authClient = createAuthClient({
|
||||
baseURL: 'http://localhost:3000'
|
||||
baseURL: 'http://localhost:3001',
|
||||
plugins: [organizationClient()]
|
||||
})
|
||||
|
||||
export const { signIn, signOut, signUp, useSession, forgetPassword, resetPassword } = authClient
|
||||
export const {
|
||||
signIn,
|
||||
signOut,
|
||||
signUp,
|
||||
useSession,
|
||||
forgetPassword,
|
||||
resetPassword,
|
||||
organization,
|
||||
useListOrganizations
|
||||
} = authClient
|
||||
|
||||
6
legalconsenthub/utils/auth-types.ts
Normal file
6
legalconsenthub/utils/auth-types.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import type { auth } from '../server/utils/auth'
|
||||
import type { authClient } from './auth-client'
|
||||
|
||||
export type Session = typeof auth.$Infer.Session
|
||||
export type ActiveOrganization = typeof authClient.$Infer.ActiveOrganization
|
||||
export type Invitation = typeof authClient.$Infer.Invitation
|
||||
Reference in New Issue
Block a user