When calling the OktaApiClient.UserFactors.VerifyFactorAsync method in order to initiate a push factor verification for a user, it seems as though the transaction ID is only accessible by parsing the URLs found in the _links entry of the VerifyUserFactorResponse that is returned. Furthermore, it does not seem as though there is a direct way to issue a cancellation to the initiated push factor verification transaction through the SDK.
Expected behavior
It would be ideal to be able to access the transaction ID directly. Is there a way to do this currently? Also, is there a way to initiate a cancellation to the push factor verification transaction through the SDK?
Minimal reproduction of the problem with instructions
Sending the push factor verification, where "userId" is the Okta user ID, and "factorId" is the enrolled push factor ID for the user:
var verifyResponseTask = _client.UserFactors.VerifyFactorAsync(userId, factorId);verifyResponseTask.Wait();var verifyResponse = verifyResponseTask.Result;
Then to monitor the poll response, I believe that I would need to use the following code:
var pollResponseTask = _client.UserFactors.GetFactorTransactionStatusAsync(userId, factorId, transactionId);pollResponseTask.Wait();var pollResponse= pollResponseTask.Result;
However, obtaining transactionId takes a bit of work to parse from the resulting verifyResponse object in the first block of code above. Is there supposed to be a direct way of obtaining it or a different method of accomplishing this through the SDK that will provide the transactionId directly? What is the recommended method of allowing a cancellation of the push factor verification?
Current behavior
When calling the OktaApiClient.UserFactors.VerifyFactorAsync method in order to initiate a push factor verification for a user, it seems as though the transaction ID is only accessible by parsing the URLs found in the _links entry of the VerifyUserFactorResponse that is returned. Furthermore, it does not seem as though there is a direct way to issue a cancellation to the initiated push factor verification transaction through the SDK.
Expected behavior
It would be ideal to be able to access the transaction ID directly. Is there a way to do this currently? Also, is there a way to initiate a cancellation to the push factor verification transaction through the SDK?
Minimal reproduction of the problem with instructions
Sending the push factor verification, where "userId" is the Okta user ID, and "factorId" is the enrolled push factor ID for the user:
var verifyResponseTask = _client.UserFactors.VerifyFactorAsync(userId, factorId);
verifyResponseTask.Wait();
var verifyResponse = verifyResponseTask.Result;
Then to monitor the poll response, I believe that I would need to use the following code:
var pollResponseTask = _client.UserFactors.GetFactorTransactionStatusAsync(userId, factorId, transactionId);
pollResponseTask.Wait();
var pollResponse= pollResponseTask.Result;
However, obtaining transactionId takes a bit of work to parse from the resulting
verifyResponse
object in the first block of code above. Is there supposed to be a direct way of obtaining it or a different method of accomplishing this through the SDK that will provide the transactionId directly? What is the recommended method of allowing a cancellation of the push factor verification?Environment