react-oidc-context icon indicating copy to clipboard operation
react-oidc-context copied to clipboard

No matching state found in storage

Open Leighton88 opened this issue 2 years ago • 3 comments

Hi

I understand this is a wrapper library for the oidc-client-ts. However if i run my reactjs application under the root i.e. https:\localhost\ the sign in works as expected i.e. contacts the Identity server and handles the response correctly.

The issue i have is that i have to install this under a sub folder i.e. Https:\localhost\SubFolder\

When doing so the identity server is contacted and a response issues. The issue lies when the library giving back an authorisation error

No matching state found in storage

having looked at the storage i can see the oidc settings stored what looks correctly. Is there something i need to do differently for running this under a sub folder?

Thanks

Leighton88 avatar Sep 04 '23 13:09 Leighton88

You will need to find out why. Enable logging: https://authts.github.io/oidc-client-ts/#md:logging

Or try to debug, see here: https://github.com/authts/oidc-client-ts/blob/2abba7e3b381ceaab6e2e0c5216a67a7f911fee8/src/OidcClient.ts#L141

pamapa avatar Sep 04 '23 14:09 pamapa

@Leighton88 Hello, I ran into a similar issue lately. It seems to me that the problem was in the fact that I was accessing the app via 127.0.0.1:<port> url and my redirect URI was set to localhost:<port>.

susoliaksamuel avatar Sep 25 '23 11:09 susoliaksamuel

Hey @Leighton88, I had a similar issue today. I forgot to implement the signinCallback causing the "No matching state found in storage" error. Maybe this comment will help you: https://github.com/authts/react-oidc-context/issues/841#issuecomment-1740973579

Lyxass avatar Sep 29 '23 14:09 Lyxass