title: Cross domain with an Iframe, pointing to SSO server
body: <p>I have an application where I am displaying some stuff in javascript modals using jquery.
  It requires the user to login for certain flows; but the user never leaves the modal.</p>
  
  <p>So here is what we do currently.</p>
  
  <ol>
  <li>During user flow if the user needs to be logged in, we hide the current div and show a login div</li>
  <li>Keep a hidden iframe with Source link as that of our SSO server.</li>
  <li>Once user submits the form, we submit the hidden iframe to the SSO server</li>
  <li>If user gets logged in we proceed with the flow.</li>
  </ol>
  
  <p>Problem is when there is error logging in. We need to get the error codes from the hidden iframe of the page; but because we don't control the content inside iframe, and it's returned by SSO server; we don't know how to read it since it's cross domain.</p>
  
  <p>Any insights?</p>