IE 11 okta-auth-js verifyToken error


#1

Using IE 11 and the okta-auth-js library is giving me the following error. Any ideas on how to get okta-auth-js to work with IE 11? All other browsers work properly. Imagine that…

This is an Angular SPA and we are using version 2.2.0 of okta-auth-js

An error occured in the application. Please try again or contact support. [object Object] Error: Uncaught (in promise): Error: Invalid argument.
Error: Invalid argument.
at verifyToken (amp.local:1234/vendor.js:90303:3)
at Anonymous function (amp.local:1234/vendor.js:91251:7)
at _fulfilled (amp.local:1234/vendor.js:183766:13)
at Anonymous function (amp.local:1234/vendor.js:183795:13)
at promise.promiseDispatch (amp.local:1234/vendor.js:183728:13)
at Anonymous function (amp.local:1234/vendor.js:183488:17)
at runSingle (amp.local:1234/vendor.js:183069:13)
at flush (amp.local:1234/vendor.js:183057:13)
at ZoneDelegate.prototype.invokeTask (amp.local:1234/polyfills.js:7198:13)
at onInvokeTask (amp.local:1234/vendor.js:43353:17)
“An error occured in the application. Please try again or contact support.”
{
[functions]: ,
proto: { },
error: { },
message: “An error occured in the application. Please try again or contact support.”,
severity: 5,
Symbol(rxSubscriber)_g.i77eokr2a0f: undefined,
Symbol(rxSubscriber)_h.i77eokr2a0f: undefined
}
{
[functions]: ,
proto: { },
description: "Uncaught (in promise): Error: Invalid argument.


#2

Here’s the solution. okta-auth-js will not work in IE 11 without a webcrypto-shim. You can read more at https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey

This should be documented