MONGODB DRIVER #2368
HamedBahram
started this conversation in
Ideas
MONGODB DRIVER
#2368
Replies: 3 comments 2 replies
-
which adapter are you using? I would check our adapters repository https://github.com/nextauthjs/adapters |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm using typeorm.mongodb
Kind Regards,
*Hamed Bahram*
…On Tue, Jul 13, 2021 at 3:35 PM Balázs Orbán ***@***.***> wrote:
which adapter are you using?
I would check our adapters repository
https://github.com/nextauthjs/adapters
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2368 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APJNCUJNN4KT5O6AG2E2WLTTXSIQLANCNFSM5AJRVPDQ>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I didn't spot anything in next-auth source code! It is probably the typeorm
integration with MongoDB.
Here is what I found in typeorm repo
<https://github.com/typeorm/typeorm/blob/master/src/driver/mongodb/MongoConnectionOptions.ts>
setting
connection option in the old way, which will be deprecated.
The write concern:
- readonly w?: string | number
- readonly wtimeout?: number
- readonly j?: boolean
the correct way is to specify a writeConcern property as an object
containing the above values like so:
writeConcert: { w: 'majority', wtimeout: 1000, j: false }
Kind Regards,
*Hamed Bahram*
…On Tue, Jul 13, 2021 at 6:05 PM Balázs Orbán ***@***.***> wrote:
https://github.com/nextauthjs/adapters/tree/main/packages/typeorm-legacy
here is the source code of that adapter. Can you spot the problem? If not,
how could we verify that it is a problem with next-auth and not an
integration issue between typeorm and MongoDB?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2368 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APJNCUOP4LDKCPRCYYBOAWLTXS2CTANCNFSM5AJRVPDQ>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using Mongodb as my database, I encountered the following error, which is relating to defining write concerns and the deprecation of the used methods in next-auth:
2021-07-13T16:20:32.203Z e9c48700-94e8-49b4-bbfd-3a4863d427f3 ERROR (node:8) [MONGODB DRIVER] Warning: Top-level use of w, wtimeout, j, and fsync is deprecated. Use writeConcern instead.
Here is the recommended way of setting write concerns from Mongodb:
Write concern can include the following fields:
writeConcern : { w: 'majority', j: true, wtimeout: 1000 }
How can this be fixed?
Beta Was this translation helpful? Give feedback.
All reactions