feat: Rollback signup on error, cleanup userDto and comment createdBy
This commit is contained in:
@@ -50,6 +50,11 @@ export function useAuth() {
|
||||
fetchOptions: {
|
||||
headers
|
||||
},
|
||||
user: {
|
||||
deleteUser: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
organizationClient({
|
||||
// Pass the same access control instance and roles to client
|
||||
@@ -158,25 +163,19 @@ export function useAuth() {
|
||||
return res
|
||||
}
|
||||
|
||||
const userDto = computed<UserDto>(() => ({
|
||||
id: user.value?.id ?? '',
|
||||
name: user.value?.name ?? 'Unknown'
|
||||
}))
|
||||
|
||||
return {
|
||||
session,
|
||||
user,
|
||||
userDto,
|
||||
loggedIn: computed(() => !!session.value),
|
||||
signIn: client.signIn,
|
||||
signUp: client.signUp,
|
||||
deleteUser: client.deleteUser,
|
||||
signOut,
|
||||
organization: client.organization,
|
||||
organizations,
|
||||
selectedOrganization,
|
||||
options,
|
||||
fetchSession,
|
||||
fetchJwtAndOrganizations,
|
||||
client,
|
||||
jwt,
|
||||
isPublicRoute,
|
||||
|
||||
Reference in New Issue
Block a user