<div dir="ltr"><div>I have an application connecting with IDP. I am using &#39;externalAuth&#39; Login handler to authenticate. Here my application is communicating</div><div>two times with Shibboleth Idp.</div><div><br></div><div>1) When the user try to access to one of our application(SP), We just prepare a Saml request,Relaystate and send it to the IDP, then</div><div>it will execute the externalAuth handler and display the login page to the user.</div><div><br></div><div>2) Again we are redirecting to the idp, once the credentials are enterd by user in login page validated against our database, then the</div><div>idp is giving saml response and relay state which we have sent in the above step.</div><div><br></div><div>Based on the Relay state(key for map), i am maintaing a map to store some values before smal request is sending to the idp. in this case</div><div>i am facing one problem which is described below.</div><div><br></div><div>-&gt; I am communicating 2 times with an idp to give an access to our application to the user. one is before showing login page and another one is</div><div>after login page.As per my observation the idp sends the &#39;RelayState&#39; which my SP was sent earlier.</div><div>-&gt; I am getting the &#39;Relaystate&#39; as a response after second communication with an idp.</div><div><br></div><div>Here my question is:</div><div>Q1) What if i opened two tabs(same browser) with login page.We are sending two &quot;Relaystate&quot; to display login page in two tabs, but</div><div>    if user enters the credentials in the first tab and redirects to the idp, it will give &#39;Relaystate&#39; in the response which was sent earlier(secodn tab).</div><div>    which is incorrect &#39;relaystate&#39;. I want the relaystate to be send properly(1st tab -&gt; 1st relaystate), because i depends on this relay state to get some stored values.</div><div>    How can i achieve this?</div></div>