Identity Engine
This guide describes how to run the embedded Identity Engine SDK or Sign-In Widget sample app. Make sure to successfully create and set up your Okta org first. You also need to download and set up the SDK .
Learning outcomes Run the embedded Identity Engine SDK or Sign-In Widget sample app.
What you need Sample code In tandem with the embedded SDK, the widget integrates into your app by using a native language interface and communicates directly with the Okta APIs. The following diagram summarizes the flow.
The sample app is located here in the Golang embedded Sign-In Widget sample app (opens new window) respository.
Ensure that you've configured your Okta org properly by completing the steps in Set up your Okta org for a password factor only use case . Ensure that you've completed the steps in download and set up the sample app . Open the embedded Widget sample application directory using Visual Studio Code or
your preferred IDE. The directory path to the sample application directory is: samples-golang/identity-engine/embedded-sign-in-widget
. Add an okta.yaml
configuration file. See Option 1: Create a configuration file for more information on how to configure and where to place the configuration file. From the command line, navigate to the Widget's sample application directory (../samples-golang/identity-engine/embedded-sign-in-widget/
). From the command line, execute the following command to install dependencies: go get
From the command line, execute the following command to start the application: go run main.go
In a web browser, navigate to http://localhost:8000/
. The Golang embedded Widget app landing page appears. Click Login . On the sign-in page, enter the username (email) and password that you've used in Create your Okta account . If you successfully sign in, you'll see a signed in screen customized with your name. Troubleshoot If the "There was an unexpected internal error. Please try again." message appears instead of the Sign-In Widget, then verify that CORS is enabled. Follow the steps in Add a trusted origin and enable CORS to enable CORS. Start your work with the use cases After you successfully run the sample app, the next step is to build your integration by using the sample app as your guide. See Load the Widget to start using the Widget and explore the available use cases.
The embedded SDK flow The SDK integrates into your app by using a native language interface and communicates directly with the Okta APIs by using a REST interface. The following diagram illustrates the SDK flow.
Run the embedded SDK sample app If you haven't already done so, set up your Okta org . If you haven't already done so, download and set up the sample app . Open the embedded SDK sample application directory using Visual Studio Code or
your preferred IDE. The directory path to the sample application is samples-golang/identity-engine/embedded-auth-with-sdk
. Add an okta.yaml
configuration file. See Option 1: Create a configuration file for more information on how to configure and where to place the configuration file. Open a terminal and navigate to the SDK's sample application directory (samples-golang/identity-engine/embedded-auth-with-sdk
). Run the following command: go run main.go
In a web browser, navigate to http://localhost:8000/
. The Golang SDK sample app home page appears. Click Sign In . On the sign-in page, enter the username (email) and password that you used in Create your Okta account . If you've successfully signed in, you'll see a signed in screen displaying your user profile information. Work with the use cases After you successfully run the sample app, you can build your own integration by using the sample app as your guide. Explore use cases that are available with the SDK, starting with the Basic sign-in flow using the password factor use case.