Resend new One Time Passcode after 5 minutes.
mdeveracoding opened this issue · 3 comments
Describe the bug?
We are implementing a custom MFA UI and are using resend code or one time passcode. We are successful in using resend code. However we are running into issues when invoking resend code/OTP....especially when the code has expired after 5 minutes.
What is expected to happen?
Receive a new one time passcode even if the original has expired after 5 minutes.
What is the actual behavior?
Using the snippet of code below, we get an exception message of "errorCode":"E0000011","errorSummary":"Invalid token provided","errorLink":"E0000011","errorId":"oae1Gut7BKiRr-6rb5kOhN1Kw","errorCauses":[]. Especially when trying to get a new one time passcode after the original has expired over 5 minutes. Please keep in mind ....using the same code below we can get a new one time passcode if we request a new OTP code within 5 minutes.
let mfaRecovery = currentStatus as! OktaAuthStatusFactorChallenge
mfaRecovery.resendFactor(onStatusChange: { status in
self.handleStatus(status: status, result: result)}, onError: { error in
Error(ErrorCodes.e805, result, error)
})
Reproduction Steps?
Login with an account that has MFA policies. Request a new OTP after 5 minutes. Especially after the first OTP has been received via email or sms.
If the current behavior is a bug, please provide the steps to reproduce and a minimal demo if possible.
Additional Information?
No response
SDK Version(s)
'OktaAuthSdk', '2.4.3'
'OktaOidc', '3.5.2'
Build Information
No response
@mdeveracoding Thanks for posting!
This seems similar to okta/okta-auth-java#175.
Thanks for mentioning me @arvindkrishnakumar-okta. I'll keep an eye on the other issue to see what the response is, to help narrow then problem down.
@arvindkrishnakumar-okta @mikenachbaur-okta , hi all, I have responded in okta/okta-auth-java#175