mirror of
https://github.com/temetro/temetro.git
synced 2026-07-26 11:58:14 +00:00
Allow unverified users to create a clinic
Since email verification is no longer enforced at sign-in, gating organization creation on `user.emailVerified` blocked onboarding with "You are not allowed to create a new organization". Allow any signed-in user to create a clinic; re-tie to emailVerified when verification returns. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -58,7 +58,10 @@ export const auth = betterAuth({
|
||||
ac,
|
||||
roles,
|
||||
creatorRole: "owner",
|
||||
allowUserToCreateOrganization: async (user) => user.emailVerified === true,
|
||||
// Verification isn't enforced right now (see emailAndPassword above), so
|
||||
// any signed-in user may create a clinic. Re-tie this to
|
||||
// `user.emailVerified === true` when verification is re-enabled.
|
||||
allowUserToCreateOrganization: true,
|
||||
membershipLimit: 200,
|
||||
invitationExpiresIn: WEEK,
|
||||
sendInvitationEmail: async (data) => {
|
||||
|
||||
Reference in New Issue
Block a user