20 lines
538 B
TypeScript
20 lines
538 B
TypeScript
// Copied from https://github.com/atinux/nuxthub-better-auth
|
|
|
|
import { useAuthState } from '~/composables/auth/useAuthState'
|
|
import { useAuthActions } from '~/composables/auth/useAuthActions'
|
|
import { useAuthClient } from '~/composables/auth/useAuthClient'
|
|
|
|
export function useAuth() {
|
|
const authState = useAuthState()
|
|
const authActions = useAuthActions()
|
|
const { client } = useAuthClient()
|
|
|
|
return {
|
|
...authState,
|
|
...authActions,
|
|
client,
|
|
deleteUser: client.deleteUser,
|
|
organization: client.organization
|
|
}
|
|
}
|