Next.js Discord

Discord Forum

Unintended redirect happening for a page route

Unanswered
Pixiebob posted this in #help-forum
Open in Discord
PixiebobOP
I am using next 14 with app directory project structure. My next app was perfectly fine. But now when I try to access the /dashboard route it redirects automatically to the / page. And there is nothing in the code that should have imparted this behaviour. Even with all the changes removed I get this same issue.
Attached few Screenshots.
Let me know what more infos are needed

3 Replies

What does your middleware and next config look like.

Also are you saying it when you go to /dashboard it redirects to / ?
Also try clearing .next folder and also clearing the cache of the site
PixiebobOP
I think it's something related to an authentication module (Kinde Auth ) I am using.
I also tried with a different route. At first it works fine. But when I try to sign in once. I get a catched error message in the module's side One or more of the claims were not verified.
And then that route becomes unacessable.

I have attached the file you asked for.