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 Golang Identity Engine sample app (archived) Golang Identity Engine embedded Widget sample app (archived) Note : The Golang sample applications (opens new window) have been archived and are no longer actively maintained or supported.
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 the Golang embedded Sign-In Widget sample app (archived).
Configure your Okta org by completing the steps in Set up your Okta org for a password factor only use case . Download and set up the sample app . Open the embedded widget project using Visual Studio Code or
your preferred IDE. The directory path to the sample app 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:
Go to the project directory (/samples-golang/identity-engine/embedded-sign-in-widget/
). Call go get
to install dependencies. Call go run main.go
to start the app. In a web browser, go to http://localhost:8000/
. The app's 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 see a signed in page 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.