Question about next-auth + next middleware
Answered
Masai Lion posted this in #help-forum
Masai LionOP
Hi, wanted to ask if its possible to use the next middleware with a matcher for the route groups, since after trying it it doesn't seems to work out 😄
Answered by not-milo.tsx
In the documentation there's no mention of this use case so I assume it's not possible. Also, the matcher is there to match url paths and since route groups don't appear in them they can't be matched.
2 Replies
In the documentation there's no mention of this use case so I assume it's not possible. Also, the matcher is there to match url paths and since route groups don't appear in them they can't be matched.
Answer
Masai LionOP
Yeah was thinking the same, it would be dope if you could do that with the route grps. Tbf I also got confused a bit since in dev mode when I go to a page in a route grp I can see the loading and building process inside the server terminal stating the /(root)/page being requested. But you are totally right that's not the url itself and after reading a bit more the matcher is there to match urls