Next.js Discord

Discord Forum

router.push did not work as I expected

Unanswered
Common carp posted this in #help-forum
Open in Discord
Common carpOP
Hi guys, I'm trying to redirect users to signin page ("/signin") when they change their password successfully, but it always redirects to home page. Can anyone help me explain why ?

5 Replies

Common carpOP
No, i'm not using any midleware
Common carpOP
Actually, Yes. But it is inside redux store. I dont think it relates to useRouter
check if you've any other redirects in sign in page
Common carpOP
Yes. I have used redirect in sign in page. But It did not redirect to sign in page. I mean at least it will log out for me one of those messages if it redirects to signin but it did not