hapi-passport-saml icon indicating copy to clipboard operation
hapi-passport-saml copied to clipboard

SchemeAuthenticate : Samlrequest is removed

Open nlapointe-factory opened this issue 4 years ago • 1 comments

Hi, I have to pass the samlrequest arg in the url to the adfs entry point. I think something is wrong in SchemeAuthenticate.js, because the search url param (which contains samlrequest) is overwrite by RelayState (line 32). const idpLoginUrl = new URL(loginUrl.toString()); This contains the samlrequest param. idpLoginUrl.search = 'RelayState=${request.path}'; This overwrite.

If I remove this line, samlrequest is passing.

Is there an option to preserve arguments, or remove the relaystate ?

Many thanks,

nlapointe-factory avatar Oct 13 '20 13:10 nlapointe-factory

In SchemeAuthenticate.js use search param set

         const idpLoginUrl = new URL(loginUrl);
         idpLoginUrl.searchParams.set('RelayState', request.path);
         return h.redirect(idpLoginUrl).takeover();

leo300 avatar Jun 27 '23 06:06 leo300