mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-26 21:45:40 -05:00
fix(organization): compatibility with exactOptionalPropertyTypes (#5337)
This commit is contained in:
+18
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user