title: Node.js passport-saml redirects to localhost:3000/login/callback all the time
body: <p>I am using the tutorial from <strong>www.npmjs.org/package/passport-saml</strong> for the SAML. I am a beginner in SAML.</p>
  
  <p>The tutorial says </p>
  
  <blockquote>
    <p>The SAML identity provider will redirect you to the URL provided by the <strong>path</strong> configuration</p>
  </blockquote>
  
  <p>I already have a OpenIdp account. It seems I can successfully login but the redirect URL always sends me to <strong>localhost:3000/login/callback</strong> which is not present in my code because I changed the <strong>'path'</strong> to <strong>'/users/login-user-db-saml'</strong> or <strong>'www.passporttoken.com:1234/users/login-user-db-saml'</strong> (both doesn't work and still sends me to the default <strong>login/callback</strong>).</p>
  
  <p>I have the code below. What I am doing wrong?</p>
  
  <pre><code>/**start FOR SAML**/
  passport.use(new SamlStrategy(
      {
          path: '/users/login-user-db-saml',
          entryPoint: 'https://openidp.feide.no/simplesaml/saml2/idp/SSOService.php',
          issuer: 'passport-saml'
      },
      function(profile, done) {
          findByEmail(profile.email, function(err, user) {
              if (err) {
                  return done(err);
              }
              return done(null, user);
          });
      })
  );
  
  app.post('/users/login-user-db-sam',
      passport.authenticate('saml', { failureRedirect: '/users/login-user-saml', failureFlash: true }),
      function(req, res) {
          res.redirect('/');
      }
  );
  
  app.get('/users/login-user-saml',
      passport.authenticate('saml', { failureRedirect: '/users/login-user-saml', failureFlash: true }),
      function(req, res) {
          res.redirect('/');
      }
  );
  /**End for SAML**/
  </code></pre>