const auth = betterAuth({
database: mongodbAdapter(client.db()),
plugins: [
organization({ allowUserToCreateOrganization: false })
],
databaseHooks: {
user: {
create: {
after: async (user) => {
// create organization for user - can't access the server auth api, can I?
}
}
}
},
// ...
})
const auth = betterAuth({
database: mongodbAdapter(client.db()),
plugins: [
organization({ allowUserToCreateOrganization: false })
],
databaseHooks: {
user: {
create: {
after: async (user) => {
// create organization for user - can't access the server auth api, can I?
}
}
}
},
// ...
})