diff --git a/lib/passport-wsfed-saml2/wsfederation.js b/lib/passport-wsfed-saml2/wsfederation.js index f7b3b70..8af9ced 100644 --- a/lib/passport-wsfed-saml2/wsfederation.js +++ b/lib/passport-wsfed-saml2/wsfederation.js @@ -27,7 +27,9 @@ WsFederation.prototype = { query.wreply = this.wreply; } - return this.identityProviderUrl + '?' + qs.encode(query); + var conjunction = (this.identityProviderUrl.indexOf('?') === -1) ? '?' : '&'; + + return this.identityProviderUrl + conjunction + qs.encode(query); }, extractToken: function(req) {