I am my website hosted on AWS (elastic beanstalk), the SSL also from there, the SSL is added as a listner to the load balancer of my app, with all HTTP traffic redirected to https,it's all working fine. I am also using google auth, with passport, which works fine with localhost but after google auth in the live website, it redirects to the HTTP part of my website which google doesn't allow, can someone help!
passport.use(new GoogleStrategy({
clientID: process.env.googleClientID,
clientSecret: process.env.googleSecret,
callbackURL: '/auth/google/callback',
()=> {my auth code});
Since the server was in HTTP and the load balancer was diverting the traffic to HTTPS the inherent path was still HTTP which is taken as a callback URL when using relative path. All I had to do is either create a https server with pem and key files or I could just hardcode the URL value in the callback, I did the later and it worked fine.