Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: avoid stale membership

Marc Seitz9ae640879054
diff --git a/pages/api/auth/[...nextauth].ts b/pages/api/auth/[...nextauth].ts
index d3491bd8..618564f1 100644
--- a/pages/api/auth/[...nextauth].ts
+++ b/pages/api/auth/[...nextauth].ts
@@ -193,25 +193,6 @@ export const authOptions: NextAuthOptions = {
update: { name: name || undefined },
});
- // If we have tenant info, ensure user is a member of the workspace
- const tenant = requested?.tenant;
- if (tenant) {
- await prisma.userTeam.upsert({
- where: {
- userId_teamId: {
- userId: user.id,
- teamId: tenant,
- },
- },
- update: {},
- create: {
- userId: user.id,
- teamId: tenant,
- role: "MEMBER",
- },
- });
- }
-
return {
id: user.id,
email: user.email,