I am working on a single page application and is using SAML to authenticate user.
I am stuck with how to solve the following probelm
When an user tries to access some bookmarked URL
myapp.com/feature#some-part
the user will be redirected to SAML IDP's login page
some-idp.com/login
since the browser will keep track of the url fragment (#some-part)
the actual url the user sees is
some-idp.com/login#some-part
Now, the user will enter login credential and the browser will POST them to
some-idp.com/process-login
However, after done this, the browser will lose the url fragment and lose track of the original URL the user tries to go to.
My question is, how to preserve the url fragment across the SAML login process?