AxaFrance / oidc-client

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

Blocking/looping script #665

Closed ctron closed 2 years ago

ctron commented 3 years ago

Issue and Steps to Reproduce

Every now and then, I run into a situation where the script blocks, and continuously loops.

Within seconds, I can see UserManager.getUser called thousand times:

image

Versions

3.1.7

Screenshots

See above

Expected

Should neither loop nor block.

Actual

Blocks/loops.

Additional Details

guillaume-chervet commented 3 years ago

Hi @ctron, Which browser are you using?

ctron commented 3 years ago

I had issues with both Firefox and Chrome.

guillaume-chervet commented 2 years ago

This sould be fixed in the futur v4 soon.

allemas commented 2 years ago

Hello !

I have the same kind of issue. In my case, we see the /authorization API endpoint call in a loop. What is strange is that the behavior seems random depending on the user.

Maybe the browser or the InMemoryStorage are having difficulties.

guillaume-chervet commented 2 years ago

The comming v4 should fix this. There is api breaking change https://www.npmjs.com/package/@axa-fr/react-oidc-context I have to add documentation and more types

guillaume-chervet commented 2 years ago

Do you still have the problem in v4?

v4 is pretty stable now https://www.npmjs.com/package/@axa-fr/react-oidc-context/v/4.0.0-beta.9

guillaume-chervet commented 2 years ago

Here you will find a v4 demo https://black-rock-0dc6b0d03.1.azurestaticapps.net/

allemas commented 2 years ago

Thanks!

When I look at it here https://www.npmjs.com/package/@axa-fr/react-oidc-context I see v4 ! Is version 4 merged into master and now stable in use?

guillaume-chervet commented 2 years ago

It is still young. It works better than v3 in our applications. And the surface api is very small, it will be essieu to maintain.

guillaume-chervet commented 2 years ago

I think it is pretty stable right now.

guillaume-chervet commented 2 years ago

I close the issue. Thank you for the issue. Feel free to reopen it.