next-auth E-Mail does not work.
What is the improvement or update you wish to see?
The documentation should provide working examples. The stuff described their doesn't work:
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from ./.env.local
event - compiled client and server successfully in 550 ms (206 modules)
wait - compiling / (client and server)...
event - compiled client and server successfully in 214 ms (233 modules)
wait - compiling /api/auth/[...nextauth] (client and server)...
event - compiled successfully in 32 ms (59 modules)
[next-auth][error][EMAIL_REQUIRES_ADAPTER_ERROR]
https://next-auth.js.org/errors#email_requires_adapter_error E-mail login requires an adapter. MissingAdapter [MissingAdapterError]: E-mail login requires an adapter.
at assertConfig (./node_modules/next-auth/core/lib/assert.js:95:14)
at AuthHandler (./node_modules/next-auth/core/index.js:70:52)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async NextAuthHandler (./node_modules/next-auth/next/index.js:24:19)
at async ./node_modules/next-auth/next/index.js:60:32
at async Object.apiResolver (./node_modules/next/dist/server/api-utils/node.js:372:9)
at async DevServer.runApi (./node_modules/next/dist/server/next-server.js:514:9)
at async Object.fn (./node_modules/next/dist/server/next-server.js:828:35)
at async Router.execute (./node_modules/next/dist/server/router.js:243:32)
at async DevServer.runImpl (./node_modules/next/dist/server/base-server.js:432:29)
at async DevServer.run (./node_modules/next/dist/server/dev/next-dev-server.js:831:20)
at async DevServer.handleRequestImpl (./node_modules/next/dist/server/base-server.js:375:20)
at async ./node_modules/next/dist/server/base-server.js:157:99 {
code: 'EMAIL_REQUIRES_ADAPTER_ERROR'
}
It check the docu but there is nothing at all about, "How The Email authentication provider can only be used if a database is configured.". Providing an "works out-of-the box archive" for would help a lo, too.
Is there any context that might help us understand?
see stacktrace above. Actually tried to get https://blog.logrocket.com/implement-authentication-authorization-next-js/ work.
Does the docs page already exist? Please link to it.
https://next-auth.js.org/providers/email
The error description as well as the linked documentation should already explain you are missing a database adapter which is required.
Check out https://authjs.dev/reference/adapters
Thanx. It might be obvious for Pro developers, but for newbies it is simply a show stopper. Is it really that hard to provide working examples?
The error description as well as the linked documentation should already explain you are missing a database adapter which is required.
Check out https://authjs.dev/reference/adapters
that link is now down
this is why everyone hates nextauth
Lol all these links are down. Install the adapter here for anyone looking now(current)email adapter info