OAuth 2.0 - Okta
OAuth 2.0 with OpenID Connect with Okta provides the ability to use Okta as the OAuth vendor and have users login before accessing a web flow in an application.
Creating an Okta Integration for your app
The following link will provide all of the necessary steps for creating an Okta Integration: Build a SSO Integration. This is required to obtain the Client ID of the integration as well as the Base Authorization Server URL.
When asked for a Redirect URI, add the following Redirect URI. The {base-domain}
can be found in Settings. For example, in the following screenshot, the base domain would be app.airkit.com
.
Redirect URIs
https://{base-domain}/internal/session-gateway/v1/oauth/callback
Configuring OAuth in the App
Access your app, go to Settings > Global and follow these steps:
- From the App Authentication Type dropdown, select Secure App
- In Authentication Method, select OAuth 2.0 w/ OpenID Connect
- As OAuth Vendor, choose Okta
- Enter your OAuth Client ID and the Base Authorization Server URL
- Save your app
Authentication Success
After setting up you OAuth authentication, go to Connections Builder and click on the On Authentication Success Event.
The โOn Authentication Successโ event will run when the user is authenticated. On this event, there is the event
namespace where you can access data about the user.
event.attributes
Includes data such as:
- Picture
- Name
- Locale
event.nameId
nameId refers to the userโs email address they authenticated with.
To access this data and store it in a session variable, In the Inspector section, click on the โ+โ icon under Actions and add a Set Variable action and set it to a property in the event
namespace.
Updated over 2 years ago