diff --git a/.changeset/shy-lobsters-turn.md b/.changeset/shy-lobsters-turn.md new file mode 100644 index 0000000..f7b7127 --- /dev/null +++ b/.changeset/shy-lobsters-turn.md @@ -0,0 +1,5 @@ +--- +'@lowdefy/community-plugin-mongodb': patch +--- + +Fixed issue where user login fails for an invited user on first signup. diff --git a/plugins/community-plugin-mongodb/src/auth/adapters/MultiAppMongoDBAdapter/createDatabaseUserFromContact.js b/plugins/community-plugin-mongodb/src/auth/adapters/MultiAppMongoDBAdapter/createDatabaseUserFromContact.js index f7e602c..b23d5c5 100644 --- a/plugins/community-plugin-mongodb/src/auth/adapters/MultiAppMongoDBAdapter/createDatabaseUserFromContact.js +++ b/plugins/community-plugin-mongodb/src/auth/adapters/MultiAppMongoDBAdapter/createDatabaseUserFromContact.js @@ -43,7 +43,7 @@ async function createDatabaseUserFromContact({ }; } - const { value: updatedContact } = await mongoClient + const updatedContact = await mongoClient .db() .collection(collectionNames.contacts) .findOneAndUpdate({ _id: contact._id }, { $set: update }, { returnDocument: 'after' });