On this page
Set up your Okta org
Get a new org set up and ready for various use cases.
What you need
Okta provides two embedded identity solutions:
- Embedded SDK only: A highly customizable solution that provides native language support for a variety of identity use cases.
- Embedded Widget + SDK: A quick and easy to set up solution that moves most of the the heavy lifting to Okta. Although the amount of code that you need to write is small, many of the most advanced identity use cases (for example, social sign-in, multifactor authentication) are supported out of the box.
This guide shows you how to set up your Okta org to support the embedded SDK or the embedded widget with SDK solutions. Ensure that you get set up with Okta and set up your Okta org for your use case before you [download and set up the SDK, widget, and sample app](
Sample apps are provided for each solution to show you exactly how to integrate the SDK and the Widget into your own app. Before you can run the sample apps or integrate embedded authentication into your own app, you need to do the following:
After you've created your app, you need to set up your Okta org for your use case scenario.
If you don't have an Okta Identity Engine org, you need to sign up for an Okta account and an Identity Engine org.
Sign up (opens new window) for an Okta account.
After you sign up, Okta sends a verification email to the email address that you provide.
Using the activate link in Okta's email, activate your account and provide a new password. Okta redirects you to the Admin Console of your new Identity Engine org.
You need to configure your default Custom Authorization Server to enable the Interaction Code flow.
- From your Okta org's Admin Console, select Security > API.
- On the Authorization Servers tab, select the pencil icon for the default Custom Authorization Server.
- Select the Access Policies tab.
- Select the pencil icon from the Actions column for the Default Policy Rule.
- In the Edit Rule dialog box, select the Interaction Code check box.
- Click Update Rule.
Create an app integration that represents the application you want to add authentication to with Okta:
In the Admin Console, go to Applications > Applications.
Click Create App Integration.
Select OIDC - OpenID Connect as the Sign-in method.
- Enter an application name.
- Ensure that the Interaction Code check box is selected.
- Select the Refresh Token check box.
- Set Sign-in redirect URIs to
On the General tab, note the Client ID value (and if applicable, the Client secret value) that is used later in your embedded solution.
Note: New apps are automatically assigned the shared default authentication policy with a catch-all rule that allows a user access to the app using either one or two factors, depending on your org setup. To view more information on the default authentication policy, from the left navigation pane, select Security > Authentication Policies and then select Default Policy.
After you've created your app integration in your Okta org, the next step is to configure your app and org to support the use case that you're implementing.
- For a basic password factor use case, see Set up your Okta org for a password factor only use case
- For a multifactor use case, see Set up your Okta org for a multifactor use case
- For a social sign-in use case, see Set up your Okta org for a social IdP use case
This section shows you how to set up your Okta org and app to support password factor only use cases. These use cases are intended to use the password factor without any additional factors (such as email or phone SMS). In the Create a new application section, you updated that app’s policy to Password only to use Password as the only factor required for a user to sign in. In the next section, follow the steps to finish setting up your Okta org for a password factor only use case.
For password-only authentication, you need to update the password authenticator policy rule to not require any additional verification.
- In the Admin Console, go to Security > Authenticators.
- Select Edit from the Actions menu on the Password authenticator row.
- On the Password policy page, scroll down to the rules section and click the pencil icon next to the Default Rule.
- In the Edit Rule dialog box, select Not required in the AND Additional verification is section.
- Click Update Rule.
This section shows you how to set up your Okta org and app to support the multifactor use cases available in this embedded authentication guide. In addition to the password factor, the multifactor use cases presented in this guide use the email and phone factors. Perform the following configuration after you've created a new app to set up the email and phone factors in your Okta org:
- Set up the email authenticator for authentication and recovery
- Add the phone authenticator for authentication and recovery
- Update your authentication policy with multifactor authentication
Note: The multifactor use cases in this guide implement the password, email, and phone factors. However, there are other supported factors that you can use in your embedded authentication app. See Multifactor Authentication (opens new window).
- In the Admin Console, select Security > Authenticators.
- Select Edit from the Actions drop-down menu on the Email authenticator row.
- In the Used for section, select Authentication and recovery for the This authenticator can be used for field.
- Click Save.
Note: If your org already has the phone authenticator added, ensure that the Authentication and recovery option is selected for the This authenticator can be used for field.
To add the phone authenticator, select Security > Authenticators in the Admin Console.
Click Add Authenticator.
On the Add Authenticator page, click Add for the Phone authenticator.
In the Verification options section, select SMS for the User can verify with field.
Note: Some SDKs support only SMS with a phone authenticator.
In the Used for section, select Authentication and recovery for the This authenticator can be used for field.
In the Admin Console, go to Security > Authentication Policies.
On the Authentication polices page, select Default Policy as this is the policy that the app that you created is assigned to.
Select Edit from the Actions menu for the Catch-all Rule.
On the Edit Rule dialog, scroll down to the AND User must authenticate with dropdown menu and select Password + Another Factor.
Ensure that no options are selected for the AND Possession factor constraints are field.
Note: Remember that since the default authentication policy is a shared policy, changes you make are applied to both new and existing apps that are assigned to it.
This section shows you how to set up your Okta org and app to support Facebook IdP use cases that are available in this embedded authentication guide. If you want to implement a use case with another social IdP, see Add an external Identity Provider for the list of Okta-supported social IdPs and instructions on how to configure them for social authentication with Okta.
Perform the following configurations after you've created a new app to set up the Facebook IdP and your Okta org:
- Create a Facebook app in Facebook
- Set up the Facebook test user
- (Optional) Switch your Facebook app to Live mode — this step is not required if you want to remain in Facebook Development mode
- Create the Facebook Identity Provider in Okta
- Add an Identity Provider routing rule in Okta
- Go to Facebook for Developers (opens new window) and click the Login link. If you don't have an account, then create one.
- Using these Facebook instructions (opens new window) as a guide, create a Facebook app. When you create the Facebook app, ensure that you select None as the app type.
- From the Facebook Apps (opens new window) page, select the app that you just created.
- On the App Dashboard page, scroll to the Add a product section.
- Click the Set up link in the Facebook Login tile.
- On the first set up page, select Web as the platform type.
- On the next page, set the value for Site URL to
- Click Save and then Continue.
- Click through all the Next buttons until you run through all of the sections.
- In the left navigation menu, click Facebook Login (under products) and then click Settings.
- On the Settings page and under Client OAuth Settings, add the following URLs for the Valid OAuth Redirect URIs field:
- Click Save Changes at the bottom of the page.
- On the App Dashboard page, expand Settings on the left side of the page, and then click Basic.
- Save the App ID and the App Secret values so you can add them to your Okta org's Identity Provider settings.
A test account is required to test Facebook sign-in in Development mode. Facebook automatically creates one test user for you. Perform the following steps to find, set the password, and save this user's information.
- From the Facebook App Dashboard page, click Roles and then click Test Users.
- Click Edit for the test user and select Change the name or password for this test user.
- In the Edit Test User dialog box, set a password in the New Password and Confirm New Password fields.
- Click Save.
- Save the test user's email and password for testing social IdP sign-in use cases with Okta and Facebook.
By default, your Facebook app is in Development mode and can only be used by the test user and the user that you used to sign in and create the Facebook app. As a result, you can only use these users when you test your Facebook sign-in use cases.
If you would like to sign in any public Facebook user, you need to set the Facebook app to Live mode. To switch your Facebook app to Live mode, perform the following steps:
- From the Facebook App Dashboard page, click Settings and then click Basic.
- Click Save Changes at the bottom of the page.
- At the top of the App Dashboard page, use the App Mode toggle to switch the app from In development to Live mode.
- In the Switch to Live Mode dialog box, click Switch Mode.
To connect your org to Facebook, you need to add and configure the Facebook IdP in Okta. The following steps assume that you have already created and configured your Facebook app and that you have the Facebook App ID and App Secret values available.
- In the Admin Console, go to Security > Identity Providers.
- Click Add Identity Provider and then select Add Facebook.
- On the Add Identity Provider - Facebook page, enter a name (for example, Facebook IdP).
- Keep the default SSO Only option for the Idp Usage field.
- Specify the Facebook App ID value as the Client ID.
- Specify the Facebook App Secret value as the Client Secret.
- Keep the default values for public_profile and email in the Scopes field.
- Click Add Identity Provider.
The final step is to add the created Facebook IdP to the routing rule.
In the Admin Console, go to Security > Identity Providers.
On the Identity Providers page, click the Routing Rules tab.
Click Add Routing Rule.
Specify the Rule Name (for example, FB and Okta Rule).
From the THEN Use this identity provider drop-down list, select the Facebook Identity Provider that you've just created. Since Okta is the default IdP, the two values should be:
- Facebook Identity Provider (IdP)
Click Create Rule.
At the prompt, click Activate.
Your new rule appears above the Default Rule in the routing rule list. This top position signifies that the setting in your new rule overrides the Default Rule.