Nodejs redirect to intended URL after login

As I continue to recreate my website in nodejs, I find myself going back to my old topics and responses to refresh my memory on how I set things up in php and adapt it to nodejs.

In my current todo to accomplish, I need to redirect a user back to the page they were on after they get successfully logged in.

I reviewed the following topic:

However, this solution does not appear to work in a nodejs project because the redirect is on the server side, not the client side.

I need advice how to redirect a user to the page they were on prior to being directed to the login page. To further complicate matters a little bit, I use the Facebook Auth, so its not a typical login form, rather just an anchor button.

Community Page
Last updated: