recoverpassword() auth flow is not recognizing when "okta_email" is passed in as the authentication type.
Opened this issue · 0 comments
thegarty-foa commented
Describe the bug
When using the recover password On-Demand flow, the object being returned from oktaAuth.idx.proceed({ authenticator: "okta_email" });
always has currentAuthenticatorEnrollment set to "phone". When passing in "okta_email as the authenticator, the expected currentAuthenticatorEnrollment value should be "email".
Reproduction Steps?
const {
status, // IdxStatus.PENDING
nextStep: {
inputs // [{ name: 'username', ... }]
}
} = await authClient.idx.recoverPassword();
// gather username from user input
const {
status, // IdxStatus.PENDING
nextStep: {
inputs, // [{ name: 'authenticator', ... }]
}
} = await authClient.idx.proceed({ username });
// user sees a list of authenticators and selects "email"
const {
status, // IdxStatus.PENDING
nextStep: {
inputs // [{ name: 'verificationCode', ... }]
}
} = await authClient.idx.proceed({ authenticator: AuthenticatorKey.OKTA_EMAIL /* 'okta_email' */ });
The value of currentAuthenticatorEnrollment from the object returned in the last call should be set to "email" but is instead always "phone"
SDK Versions
okta-auth-js 7.5.0
Additional Information?
No response