oidc-client icon indicating copy to clipboard operation
oidc-client copied to clipboard

Error after latest update of react-oidc

Open abhilashlr7 opened this issue 2 years ago • 7 comments

Issue and Steps to Reproduce

crypto.js?9541:72 Uncaught (in promise) Error: window.crypto.subtle is unavailable.
    at deriveChallengeAsync (crypto.js?9541:72:1)
    at eval (requests.js?2b19:123:1)
    at Generator.next (<anonymous>)
    at eval (requests.js?2b19:8:1)
    at new Promise (<anonymous>)
    at __awaiter (requests.js?2b19:4:1)
    at eval (requests.js?2b19:120:1)
    at eval (login.js?be19:67:1)
    at Generator.next (<anonymous>)
    at fulfilled (login.js?be19:5:43)

Versions

^6.14.1

Screenshots

Expected

The user should be redirected to the login screen, but instead it shows this error on the console.

Actual

The above error is displayed in console and login is prevented.

Perhaps, this seems to happen only in Local env which is strange!

Additional Details

Using NextJS 13

abhilashlr7 avatar Feb 06 '23 07:02 abhilashlr7

hi @abhilashlr7 ,

Thank you for your issue.

Does this error happen in your browser or in the node.js console ?

guillaume-chervet avatar Feb 06 '23 14:02 guillaume-chervet

In the browser @guillaume-chervet

abhilashlr7 avatar Feb 07 '23 06:02 abhilashlr7

Thank you @abhilashlr7 , what does look like you configuration? I would like to try to reproduce it.

guillaume-chervet avatar Feb 07 '23 06:02 guillaume-chervet

Which browser are you using @abhilashlr7 ?

guillaume-chervet avatar Feb 08 '23 06:02 guillaume-chervet

Hi @abhilashlr7 , I cannot reproduce the error but i have try an idea fix in version 6.14.5 for your problem.

guillaume-chervet avatar Feb 15 '23 08:02 guillaume-chervet

@guillaume-chervet looks like the issue is fixed. thanks! Closing this ticket

abhilashlr7 avatar Feb 18 '23 13:02 abhilashlr7

Hi @guillaume-chervet this issue is still happening again on higher versions. It seems pretty random, like for some of our engineers, this happens in local, but it doesn't in my case. Also, I think, if I run on https in my local env, it doesn't throw this error. But if it is on http then this error pops back in. Something to do with it, not sure?

abhilashlr7 avatar Mar 14 '23 03:03 abhilashlr7