I have multiple MFA methods configured and using a custom UI, I am trying to do the 2 factor authentication by invoking Okta idx APIs.
In the first step, I invoke authenticate() API with valid credentials for username and password.
In the next step, when my custom UI selects an MFA method,(say Google authenticator) from a drop down, I invoke the Okta API proceed() to set the authenticator as that of google authenticator and then verifies successfully.
But, in my next trial when I enter the user name and password and invoke the authenticate() API, the transaction response seems like the authenticator option is already set as the Google Authenticator.
How can I change it?
I have tried invoking idx.cancel() to clear the previous state. But, still it persists the authenticator key in the nextSteps of that transaction response.
Please suggest on how to clear the authenticator selected, on trying to authenticate for the second time.
Thanks.