(gate: SignupGate)
| 276 | |
| 277 | // True when the single org has no members yet — the unclaimed first-run state. |
| 278 | const orgHasNoMembers = async (gate: SignupGate): Promise<boolean> => { |
| 279 | const auth = gate.getAuth(); |
| 280 | if (!auth) return true; |
| 281 | return (await countOrgMembers(auth, gate.organizationId)) === 0; |
| 282 | }; |
| 283 | |
| 284 | const createAuthInstance = (client: Client, getOrganizationId: () => string, gate?: SignupGate) => |
| 285 | betterAuth(makeAuthOptions(client, getOrganizationId, gate)); |
no test coverage detected