-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from lowdefy/fix-mdb-auth-adapter-timeout
Fix mdb auth adapter timeout
- Loading branch information
Showing
11 changed files
with
120 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@lowdefy/community-plugin-mongodb': minor | ||
--- | ||
|
||
Add option to configure MultiAppMongoDBAdapter collection names. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@lowdefy/community-plugin-mongodb': patch | ||
--- | ||
|
||
Fix connection timeouts in MultiAppMongoDBAdapter. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 18 additions & 4 deletions
22
...s/community-plugin-mongodb/src/auth/adapters/MultiAppMongoDBAdapter/createDatabaseUser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
...community-plugin-mongodb/src/auth/adapters/MultiAppMongoDBAdapter/getUserFromDbByEmail.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
...ns/community-plugin-mongodb/src/auth/adapters/MultiAppMongoDBAdapter/getUserFromDbById.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
...s/community-plugin-mongodb/src/auth/adapters/MultiAppMongoDBAdapter/updateDatabaseUser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
async function updateDatabaseUser({ adapterUserData, db }) { | ||
async function updateDatabaseUser({ adapterUserData, collectionNames, mongoClient }) { | ||
const { emailVerified: email_verified, id, image } = adapterUserData; | ||
await db.contacts.updateOne({ _id: id }, { $set: { email_verified, image } }); | ||
await mongoClient | ||
.db() | ||
.collection(collectionNames.contacts) | ||
.updateOne({ _id: id }, { $set: { email_verified, image } }); | ||
} | ||
|
||
export default updateDatabaseUser; |
Oops, something went wrong.