Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: select authenticator auto selects when methodType differs #1470

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

jaredperreault-okta
Copy link
Contributor

No description provided.

// fix for OKTA-612939 (below) seems to have caused a bug when trying to re-select authenticators
// with multiple methodTypes. If `options.step` is passed, this remediation is explicitly being
// invoked, therefore do not guard against auto-remediating the selected authenticator (OKTA-646147)
if (this.options.step) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (this.options.step) {
if (this.options.step || this.values.methodType) {

What do you think about this fix?
Should cover case if user doesn't provide step, eg:

await oktaAuth.idx.authenticate({ username: '...', password: '...' })
await oktaAuth.idx.proceed({ authenticator: 'phone_number', methodType: 'sms' })
await oktaAuth.idx.proceed({ authenticator: 'phone_number', methodType: 'voice' })

Copy link
Contributor

@denysoblohin-okta denysoblohin-okta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix with step looks good to me.
What do you think about checking methodType aswell?
https://github.com/okta/okta-auth-js/pull/1470/files#r1394258583

Please add changelog

'--verbose',
'--disable-dev-shm-usage'
]);
if (process.env.CHROME_BINARY) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to specify CHROME_BINARY in testenv locally?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants