1: Your app displays the sign-in page
Create a sign-in page that captures the user's username.
2: The user submits their username
Call OktaAuth.idx.authenticate()
and pass in the username.
3. The user verifies their identity with the email authenticator
OktaAuth.idx.authenticate()
returns an IdxTransaction
object indicating that the user needs to verify their identity with the email authenticator challenge.
The email authenticator supports user verification by one-time passcode (OTP) and by magic links. To learn more, see the Okta email integration guide.
4. Your app handles an authentication success response
When the user completes the email authenticator verification, one of OktaAuth.idx
methods returns IdxTransaction.status
of SUCCESS
along with ID and access tokens, which indicates that the user successfully signed in.
Store these tokens for future requests and redirect the user to the default page after a successful sign-in attempt.
Note: In other use cases where additional sign-in authenticators are required, the user needs to choose and verify all required authenticators before IdxTransaction.status
of SUCCESS
is returned.