Reputation: 161
How do I programatically implement MFA in Okta ? My requirements are something like this:
What are the API's/SDK's that I have to use to implement these use cases ?
Upvotes: 3
Views: 1799
Reputation: 1
Are you using @okta/okta-react? It has a signIn method. A successful response will return an object with a status and factors with enroll methods.
Upvotes: 0
Reputation: 627
for point 3, you can use the OKTA MFA API. https://developer.okta.com/docs/reference/api/factors/
Upvotes: 0
Reputation: 205
You can implement this using the Authn APIs, or alternatively, use the Sign-In Widget, which implements these API's for you.
Note, if you are implementing it yourself: the authn flow is driven by policies, so you wouldn't do something like "for this user, prompt for Okta Verify". Rather, you would configure the MFA scenarios via the Okta admin pages (probably by assigning these users to groups with different Sign-On Policies). When authenticating, you will receive a response from the server for enrolling/challenging via the various factors.
Upvotes: 2