okta / okta-signin-widget

HTML/CSS/JS widget that provides out-of-the-box authentication UX for your organization's apps
Other
376 stars 319 forks source link

Throw error if configured with a scope string instead of array #2231

Open aaronpk opened 3 years ago

aaronpk commented 3 years ago

I'm submitting a

Background info

Previous versions allowed this to be configured with string values of scope, e.g. scope: 'openid email'. Now, the values need to be an array, e.g. scopes: ['openid', 'email'].

Expected behavior

Configuring the widget with a string value should throw an error, since this will not work. This is especially important when someone is upgrading from a previous version of the widget.

What went wrong?

Instead, the widget hangs after the user enters their credentials, no error is in the console, and no tokens are returned. Since there is no error visible in the console or anywhere else, there is no clear indication that this was the source of the problem.

Steps to reproduce

Your environment

denysoblohin-okta commented 3 years ago

Thanks for pointing on this issue Internal ref: https://oktainc.atlassian.net/browse/OKTA-433743