fix(organization): compatibility with exactOptionalPropertyTypes (#5337)

This commit is contained in:
Alex Yang
2025-10-15 23:46:03 +00:00
committed by GitHub
parent a048f804ff
commit b4a7ea6296
2 changed files with 18 additions and 9 deletions
@@ -0,0 +1,18 @@
import { betterAuth } from "better-auth";
import { organization } from "better-auth/plugins";
const auth = betterAuth({
plugins: [
organization({
requireEmailVerificationOnInvitation: true,
creatorRole: "owner",
teams: {
enabled: true,
},
dynamicAccessControl: {
maximumRolesPerOrganization: 20,
enabled: true,
},
}),
],
});
@@ -503,15 +503,6 @@ export const listOrgRoles = <O extends OrganizationOptions>(options: O) => {
}),
})
.optional(),
metadata: {
$Infer: {
query: {} as
| {
organizationId?: string | undefined;
}
| undefined,
},
},
},
async (ctx) => {
const { session, user } = ctx.context.session;