Replies: 1 comment
-
I'm facing the same problem here. Trying to access MongoDB from the middleware is not working |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is mostly a theoretical question but I've been following the next js tutorial here: https://nextjs.org/learn/dashboard-app/adding-authentication and at some point the author enables authentication in their demo app through
Auth.js
.It all works fine and all but after going through
Auth.js
docs I got a little confused: Using the 'Credentials' strategy how is middleware supposed to read the browser cookies and check the database for an active session when it is explicitly stated that middleware can't access a DB due to the edge environment?Thanks 🙏
Beta Was this translation helpful? Give feedback.
All reactions