okta / okta-sdk-golang

A Golang SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
https://github.com/okta/okta-sdk-golang
Other
175 stars 143 forks source link

VerifyFactor does not return `transaction_id` to use in GetFactorTransactionStatus #300

Closed chrishoffman closed 2 years ago

chrishoffman commented 2 years ago

Describe the feature request?

While working with an MFA push factor, I was unable to easily initiate the push MFA request and then poll for the status. When you initiate the VerifyFactor request, a poll link is returned that can be used. The SDK method provided is GetFactorTransactionStatus which requires the transaction id of the verify request. I was able to work around this issue by parsing the transaction id from the links but it would be great if the VerifyFactor request would return the transaction id in the payload. Another workaround would be to take the links and use the url directly (as the GetFactorTransactionStatus does).

New or Affected Resource(s)

UserFactor.VerifyFactor UserFactor.GetFactorTransactionStatus

Provide a documentation link

https://developer.okta.com/docs/reference/api/factors/#issue-a-push-factor-challenge https://developer.okta.com/docs/reference/api/factors/#verify-a-push-factor-challenge

Additional Information?

No response

aarongranick-okta commented 2 years ago

@chrishoffman Thank you for the suggestion. I will pass this along to our backend engineers for investigation.

monde commented 2 years ago

@chrishoffman your explanation is thorough and I'm glad to see how you are pulling the transaction id out of the information in the links map, that you are not blocked. That said, this code is auto generated from a swagger spec. I know that tweaking the generator to render this feature given all of the other work we have on the backlog for golang is going to be too expensive. I'm going to close this feature request for now. If this is a must have for your organization please open a support ticket https://support.okta.com/ so it can be prioritized internally at Okta. Thanks

chrishoffman commented 2 years ago

@monde My only concern with this is that the polling URL construction may change in the future. I may abandon the parsing of URL and reimplement the method GetFactorTransactionStatus in my application. I also don't see a way that you can string together the calls to use GetFactorTransactionStatus.