okta / okta-auth-js

The official js wrapper around Okta's auth API
Other
453 stars 265 forks source link

OKTA Static SPA Example - TypeError: Cannot read properties of undefined (reading 'map') - How to implement MFA? #1467

Open earnestangel opened 1 year ago

earnestangel commented 1 year ago

Describe the bug

When MFA is required to continue authenticating in the static SPA example, it is just showing a blank area.

Upon looking into the console, it shows: TypeError: Cannot read properties of undefined (reading 'map')

(traced to line 982, see additional information below)

Reproduction Steps?

  1. Install the @okta/samples.static-spa sample (@okta/okta-auth-js)
  2. Install dependencies
  3. Set the config (Issuer, Client ID etc)
  4. Make sure the scopes are all set (your app is an SPA)
  5. Enable Okta Verify (2-factor, password + App)
  6. Try to login with the static spa example
  7. The MFA challenge just show you the Go Back button

SDK Versions

System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz Memory: 17.69 GB / 31.73 GB
Binaries:
Node: 18.12.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 10.2.0 - C:\Program Files\nodejs\npm.CMD
Browsers: Internet Explorer: 11.0.19041.1566 npmPackages: @okta/okta-auth-js: * => 7.4.3

Additional Information?

See line 982 of the static SPA example - I got the error here when using MFA (OKTA Verify)

See line 846 of the static SPA example - If OKTA isn't planning to develop this in the near future, please at least lead us to the right documentation on how to take over from here.

denysoblohin-okta commented 11 months ago

Thanks for reporting this issue Internal ref: OKTA-664666