BitySA / oauth2-auth-code-pkce

An OAuth 2.0 client that ONLY supports the Authorization Code flow with PKCE support.
Apache License 2.0
52 stars 17 forks source link

Unhandled promise rejection ReferenceError: 'crypto' is undefined #20

Closed yu-allen closed 4 years ago

yu-allen commented 4 years ago

In IE11, I am getting this error.

Screen Shot 2020-11-04 at 12 19 19 PM

Is there any recommended polyfill to fix this issue?

lf94 commented 4 years ago

Hey @yu-allen , you should use a polyfill to provide this. Here it fails probably because IE11 doesn't support the SubtleCrypto interface. https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto

yu-allen commented 4 years ago

Awesome, thanks for the info. We ended resolving using the Crypto Shim: https://github.com/vibornoff/webcrypto-shim