-
Notifications
You must be signed in to change notification settings - Fork 14
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
Submitting wrong passcode challenge produces successful result. Remediation messages are empty as well. #180
Comments
@LoserAntbear, in this case, okta-idx-kotlin should ideally return an error. I will look into this issue and see why it's not doing that. |
@rajdeepnanua-okta Thanks a lot! It'll help us to fix the process. :) |
@LoserAntbear, I looked more into this and it seems to be expected behavior. OidcClientResult.<Success/Error> indicates whether the call to proceed failed. In this case, the response is 401, but there is valid data in the response from calling proceed which indicates how the IDX form should be rendered next. The only case that Error is returned is if the response JSON from the server is empty or invalid. dynamic-app sample in this repo provides a sample of how it handles the same response here: okta-idx-android/dynamic-app/src/main/java/com/okta/idx/android/dynamic/auth/DynamicAuthViewModel.kt Line 425 in f643c17
The response should be treated as if it's not an error since it returned valid data to render the next form. |
@rajdeepnanua-okta |
Okay. Figured that out. For some reasons messages from fields do not get to |
I struggled to find out this, I created a ktx to check for the error, the same happens with other errors.
|
I agree this seems a bit inconvenient. Looking into how this can be made easier, and how other idx SDKs are doing the same. |
Describe the bug?
Greetings.
I've implemented user self-registration flow regarding code examples provided.
On the step of mobile phone verification user has to submit code challenge. Although, even if they supply wrong code challenge
okta-idx
proceeds with that as a successful result.Generalised schematic description of the flow calls in the code: (I cannot provide actual code pieces, sorry)
Despite wrong
passcode
is submitted (not the one, given in SMS) and api call returns 401 and form field with errors, okta does not result inOidcClientResult.Error
, it producesOidcClientResult.Success
.I've tried to access for messages to rely upon them in such case:
But the messages collection is empty all the time.
Could you, please help me handle the case?
Note: the same process on swift is handled via OidcClientResult.Error (swift counterpart of it). I presumed that the process should match between platforms
What is expected to happen?
Okta produces
OidcClientResult.Error
when proceeding with remediation, which returns 401 code. Or okta populates related remediationmessages
.What is the actual behavior?
Okta produces
OidcClientResult.Success
when proceeding with remediation, which returns 401 code. Remedation messages collection is empty.Reproduction Steps?
Sadly, I cannot provide a repo due to security resctrictions, but the steps are described above in details.
Additional Information?
No response
SDK Version
okta-idx-kotlin:2.1.0
Build Information
gradle-7.5.1
com.android.tools.build:gradle:7.2.2
The text was updated successfully, but these errors were encountered: