Node.js: Trying To Redirect A User After Signing Up/login In Nodejs
I'm trying to redirect a user to his/her profile page in node after he logs in/signs up. The login/signup system is working perfectly and data is getting saved. But when the user i
Solution 1:
You are giving routing information to your /me/id route incorrectly.
To give dynamic route parameter you need to add : before that variable. Replace your route
router.get("/me/id", ...
to
router.get("/me/:id", ...
you can read more about express routing here.
and other than that you are also not passing id in login method redirect. I don't know if you have another route setup for that, if not that you also need to add that.
Post a Comment for "Node.js: Trying To Redirect A User After Signing Up/login In Nodejs"