title: Node.js Passport SAML from multiple Identity Providers
body: <p>I've implemented <a href="http://passportjs.org" rel="noreferrer">Passport-SAML</a> into my site, and now I've been tasked with connecting our site with two other Identity Providers. In my code, it seems to use only the most recent definition of the SamlStrategy.  How can I set up Passport to allow multiple different implementations of the same Strategy?</p>
  
  <p>My implementation looks like this:</p>
  
  <pre><code>passport.use(new SamlStrategy(
      {
          path: '/saml',
          entryPoint: "https://idp.identityprovider.net/idp/profile/SAML2/Redirect/SSO",
          issuer: 'https://www.serviceprovider.com/saml',
          identifierFormat: 'urn:domain:safemls:nameid-format:loginid'
      },
      function(profile, done) {
          console.log("SamlStrategy done", profile)
          User.findOne({email:profile.Email}, function(err, user) {
              if (err) {
                  return done(err);
              }
              if(!user) return done(null, false, {message: 'No account associated with this email.'})
              return done(null, user);
          });
      }
  ));
  </code></pre>