Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Add additional fields to organization schema in auth plugin

Bill Yangad9228f1f5b0
diff --git a/server/src/lib/auth.ts b/server/src/lib/auth.ts
index 6a4837d08..1ff06d121 100644
--- a/server/src/lib/auth.ts
+++ b/server/src/lib/auth.ts
@@ -30,6 +30,30 @@ const pluginList = [
inviteLink
);
},
+ schema: {
+ organization: {
+ additionalFields: {
+ stripeCustomerId: {
+ type: "string",
+ required: false,
+ },
+ monthlyEventCount: {
+ type: "number",
+ required: false,
+ defaultValue: 0,
+ },
+ overMonthlyLimit: {
+ type: "boolean",
+ required: false,
+ defaultValue: false,
+ },
+ planOverride: {
+ type: "string",
+ required: false,
+ },
+ },
+ },
+ },
}),
emailOTP({
async sendVerificationOTP({ email, otp, type }) {