I developed (in node.js) a simple site (example: http://www.mydomain.com) and I want to allow clients to authenticate through https (example: https://www.mydomain.com/login). After successfully authentication, they are redirected to my site in http... (not secure)
How can I do this? I created two simple files (mydomain.js and mydomainsecure.js) where I run two instances of node on two different ports (80 for http and 443 for https), but after login on https (and redirect to http) I'm not logged in (obviously????)
What is the correct way to implement this?