Skip to content

MongoDB Adapter: Unsupported BSON version, bson types must be from bson 5.0 or later #7022

@yahavf6

Description

@yahavf6

Adapter type

@next-auth/mongodb-adapter

Environment

System:
OS: macOS 13.2.1
CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
Memory: 1.80 GB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node
Yarn: 1.22.19 - ~/WebstormProjects/intail-mono/node_modules/.bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v16.18.0/bin/npm
Watchman: 2023.03.13.00 - /usr/local/bin/watchman
Browsers:
Chrome: 111.0.5563.64
Safari: 16.3

Reproduction URL

http://localhost:3000

Describe the issue

I have this issue when trying to use the adapter:

[next-auth][error][adapter_error_createUser] 
https://next-auth.js.org/errors#adapter_error_createuser Unsupported BSON version, bson types must be from bson 5.0 or later {
  message: 'Unsupported BSON version, bson types must be from bson 5.0 or later',
  stack: 'BSONVersionError: Unsupported BSON version, bson types must be from bson 5.0 or later\n' +

How to reproduce

Just copy and paste the example from the docs

Expected behavior

To work

Metadata

Metadata

Assignees

No one assigned

    Labels

    adaptersChanges related to the core code concerning database adaptersmongodb@auth/mongodb-adaptertriageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions