I am trying to implement MFA authentication in my Java web application (Tapestry 5) as per the README.md at: GitHub - okta/okta-idx-java: okta-idx-java
After initializing my IDXAuthenticationWrapper object, when I call begin() I get the error: “java.lang.IllegalArgumentException: interactionHandle cannot be null”
Drilling down, it looks like the call to AuthenticationTransaction.create(client, null, null, requestContext).asAuthenticationResponse() in begin(com.okta.idx.sdk.api.model.RequestContext) is throwing ProcessingException.
The begin method is calling interact() on the IDXAuthenticationWrapper’s client object, which at line 173 in BaseIDXClient it’s hitting:
Assert.notNull(interactResponse.getInteractionHandle(), “interactionHandle cannot be null”);
At this point, the interactionHandle in the InteractResponse object that it attempted to parse out of the JSON returned in the Response is indeed null, even though there is a value for interaction_handle coming back in the JSON. I’m not sure if there’s some weirdness going on with ObjectMapper in jackson, or if maybe I’ve hit some kind of bug.
AFAIK, I’m setting the issuer (https://{mydomain}.okta.com/oauth2/default), client ID and secret, scopes (openid, profile, email, offline_access) and redirect URI correctly when I instantiate the IDXAuthenticationWrapper object. I’m using okta-idx-java-api version 3.0.4 in my pom.xml.
Has anyone seen this issue?