I have an application, where I am displaying some stuff in javasctip modals using jquery. It req. user to login for certain flows; but we never leave modal for user.
So here is what we do currently.
- During user flow if user needs to be logged in, we hide current div and show a login div
- Keep a hidden iframe with Source link as that of our SSO server.
- Once user submits the form, we submit the hidden iframe to the SSO server
- If user gets logged in we proceed with the flow.
Problem is when there is error for user login. 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.
Any insights?