From 01c7138612edb9481341dcfaf144d6eaf2375107 Mon Sep 17 00:00:00 2001 From: Ian Cervantez Date: Wed, 25 Apr 2018 18:47:35 -0500 Subject: [PATCH] Adding support for query params in identityProviderUrl (#83) --- lib/passport-wsfed-saml2/wsfederation.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) {