-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exporting auth as middleware doesn't work #10912
Comments
ShahriarKh
added
bug
Something isn't working
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
May 14, 2024
Same error here!
|
This workaround works so far. I hope a fix will be released soon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Reproduction URL
https://github.com/ShahriarKh/middleware-test
Describe the issue
Using the method mentioned in the examples and also in the docs doesn't work at all.
I tried switching bun/Node, and also switching Next.js version (downgraded to 14.1.0 and 14.2.0 and both had the same issue)
I have to use a custom function like this, which is not desirable:
How to reproduce
Clone the app and visit / or /test.
Expected behavior
The middleware should automatically redirect to the login page if the request is unauthenticated.
The text was updated successfully, but these errors were encountered: