Pages property inside middleware vs configuration #11282
Unanswered
asifkabani
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was wondering when we set the
pages
property inside the configuration, vs when we set thepages
property inside the middleware file, what is the difference? So for example, my custom sign in page is at/api/auth/login
so I am setting that location in both the config and the middleware.I understand that if I use the middleware route that it needs to correctly reference the path inside the config pages path. Right now, if I just use the default export
export { default } from "next-auth/middleware";
and if the user is not logged in, it correctly redirects them to the login page.In this case, why or when do I need to also use the pages property for the example provided using the
withAuth
method?Beta Was this translation helpful? Give feedback.
All reactions