okta / okta-idx-java

okta-idx-java
https://github.com/okta/okta-idx-java
Other
14 stars 23 forks source link

Fix stateHandle passing for recoverPassword. #373

Closed JayNewstrom closed 2 years ago

JayNewstrom commented 2 years ago

This is really just step one in a huge project that will require us to pass the correct stateHandle for every flow. Not all flows exhibit this broken behavior, so this is the one I choose to fix first.

JayNewstrom commented 2 years ago

@arvindkrishnakumar-okta we are violating the IDX contract. We can't use the top level state handle, we need to use the ones at the remediation level. So we likely need a much larger change to update all calls to proceedContext.getStateHandle() to pull from the correct remediations like I updated here.

JayNewstrom commented 2 years ago

Fixes: https://github.com/okta/okta-idx-android/issues/150

arvindkrishnakumar-okta commented 2 years ago

@arvindkrishnakumar-okta we are violating the IDX contract. We can't use the top level state handle, we need to use the ones at the remediation level. So we likely need a much larger change to update all calls to proceedContext.getStateHandle() to pull from the correct remediations like I updated here.

To the best of my knowledge, there was never an IDX contract or agreement on which stateHandle element to use from the IDX backend response. We (backend SDKs at least) were working on the assumption (discovery) that the top level stateHandle and the stateHandle inside remediation would remain the same. Now that we have discovered that this assumption is not always true, I will have to make necessary changes at a much larger level in the SDK. cc: @bretterer @laura-rodriguez @JayNewstrom

naveentrevonix commented 2 years ago

We do have the same issue, please do merge the pull request.