(gate: SignupGate)
| 252 | |
| 253 | // True when the single org has no members yet — the unclaimed first-run state. |
| 254 | const orgHasNoMembers = async (gate: SignupGate): Promise<boolean> => { |
| 255 | const auth = gate.getAuth(); |
| 256 | if (!auth) return true; |
| 257 | return (await countOrgMembers(auth, gate.organizationId)) === 0; |
| 258 | }; |
| 259 | |
| 260 | const createAuthInstance = (client: Client, getOrganizationId: () => string, gate?: SignupGate) => |
| 261 | betterAuth(makeAuthOptions(client, getOrganizationId, gate)); |
no test coverage detected