1: Your app displays sign-up link on sign-in page
Add a Sign up link on your app's sign-in page. When the user clicks this link, redirect them to a sign-up page where they can sign up for a new account.
2: Your app displays sign-up page
Create a sign-up page that captures the user's first name, last name, and email.
3: The user submits their new account details
When the user submits their account details, create an object with firstName
, lastName
, and email
properties and assign them the values entered by the user.
Note: The email
property represents the account's username and primary email address.
Send this new object to OktaAuth.idx.register()
.
4. The user verifies their identity using the email authenticator
OktaAuth.idx.register()
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.
5. Your app displays the remaining optional authenticators
After the user verifies their identity using the email authenticator, OktaAuth.idx.proceed()
returns an IdxTransaction
object indicating that the user has the option to enroll in additional authenticators. The IdxTransaction.nextStep.canSkip
property is true
if the remaining authenticators are optional.
Create and display a page that lists the remaining optional authenticators and allows the user to skip registering any additional authenticators.
Note: In other use cases where there are additional required authenticators, IdxTransaction.nextStep.canSkip
equals false
and the Skip button should be omitted.
6. The user skips the remaining optional authenticators
When the user clicks the Skip button, call OktaAuth.idx.proceed()
and pass in an object with a skip
property equal to true
.
OktaAuth.idx.proceed()
should return an IdxTransaction.status
of SUCCESS
along with access and ID tokens, which indicates a successful new user sign-up flow.
Store these tokens for future requests and redirect the user to the default page after a successful sign-up attempt.