AxaFrance / oidc-client

Light, Secure, Pure Javascript OIDC (Open ID Connect) Client. We provide also a REACT wrapper (compatible NextJS, etc.).
MIT License
601 stars 161 forks source link

Use of window.location.replace to initiate login call #1450

Closed synapxe-siang13 closed 2 months ago

synapxe-siang13 commented 2 months ago

Issue and Steps to Reproduce

After SSO and redirecting to the webpage, the history stack is duplicated in Safari or IOS due to window.location.href. Is there any way to change this behaviour?

guillaume-chervet commented 2 months ago

HI @synapxe-siang13, Thank you for your issue,

You can inject your own behavior inside the OidcProvider :

https://github.com/AxaFrance/oidc-client/blob/4f9ca8e903fc286f4d72ce069ad92873624ca2d3/packages/react-oidc/src/OidcProvider.tsx#L44C14-L44C28

synapxe-siang13 commented 2 months ago

@guillaume-chervet Thank you for your reply. I will test this out.