(gate: SignupGate)
| 335 | |
| 336 | // True when the single org has no members yet — the unclaimed first-run state. |
| 337 | const orgHasNoMembers = async (gate: SignupGate): Promise<boolean> => { |
| 338 | const auth = gate.getAuth(); |
| 339 | if (!auth) return true; |
| 340 | return (await countOrgMembers(auth, gate.organizationId)) === 0; |
| 341 | }; |
| 342 | |
| 343 | const createAuthInstance = (client: Client, getOrganizationId: () => string, gate?: SignupGate) => |
| 344 | betterAuth(makeAuthOptions(client, getOrganizationId, gate)); |
no test coverage detected