2

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?

user2628641
  • 2,035
  • 4
  • 29
  • 45
  • Is this only a problem when saving and using a bookmark or also when just pasting the link in the browser? What IDP are you using? – Stefan Rasmusson May 08 '17 at 13:55
  • Related: https://stackoverflow.com/questions/20522580/url-fragment-lost-as-part-of-saml-token-authentication-workaround-standard-pa – Elliot Nelson Jan 22 '19 at 15:19
  • *yes, if you properly urlencode the URL the fragment will be preserved* https://shibboleth.1660669.n2.nabble.com/Shibboleth-Idp-does-not-persist-URL-hash-fragments-across-a-login-redirect-tp7624686p7624736.html – Bernhard Döbler Jan 14 '20 at 08:58

0 Answers0