How to Create an OIDC App on Okta
This page is for authors of the Okta Developer Blog. The rendered snippets are also useful for anyone setting up an Okta OIDC app by hand.
Use the Admin Console to register your app
To walk readers through creating an application in Okta, call the integrator() macro in your post. It renders step-by-step Admin Console instructions for the app type you specify and links to the matching guide in the developer docs. Screenshots are discouraged because they're hard to keep up to date.
Every post can call the macros without importing anything: the build injects macro into each post automatically. The macros live in src/_macros/.
Two older macros still exist for posts written before May 2025, when the Okta CLI was deprecated: cli() renders Okta CLI instructions and maven() renders a Maven-based setup that is also deprecated (see #142). Don't use either in new posts. Older posts that rely on them carry the integrator-org-warning.njk include, which tells readers the commands no longer work as written.
Blog post syntax
The basic call for manual setup instructions is:
{{ macro.integrator({type: "spa", loginRedirectUri: "http://localhost:3000/callback"}) }}
This renders the following:
Before you begin, you'll need an Okta Integrator Free Plan account. To get one, sign up for an Integrator account. Once you have an account, sign in to your Integrator account. Next, in the Admin Console:
Go to Applications and Resources > Applications
Click Create App Integration
In the Sign in Method section, select OIDC - OpenID Connect
Select Single-Page Application as the application type, then click Next
Enter an app integration name
In the Grant type section, ensure that both Authorization Code and Refresh Token are selected
Configure the redirect URIs:
- Sign-in redirect URIs:
http://localhost:3000/callback - Sign-out redirect URIs:
http://localhost:3000
- Sign-in redirect URIs:
In the Assignments section, assign a group or keep the default Everyone group assigned for all
Click Save
Where are my new app's credentials?
Creating an OIDC Single-Page App manually in the Admin Console configures your Okta Org with the application settings. You may also need to configure trusted origins for http://localhost:3000 in Security > API > Trusted Origins.
After creating the app, you can find the configuration details on the app's General tab:
- Client ID: Found in the Client Credentials section
- Issuer: Found in the Issuer URI field for the authorization server that appears by selecting Security > API from the navigation pane.
Issuer: https://dev-133337.okta.com/oauth2/default
Client ID: 0oab8eb55Kb9jdMIr5d6
NOTE: You can also use the Okta PowerShell Module to automate this process. See this guide for more information about setting up your app.
Configuration options
The macro takes one object. Supported values for type: spa, web, native, and service.
Other keys you can pass:
| Key | Possible values |
|---|---|
framework | Angular, React, Vue, Okta Spring Boot Starter, Spring Boot, Quarkus, ASP.NET Core. Adjusts the config snippet and the docs link. |
loginRedirectUri | Printed as given. For several URIs, pass one string in the form [url1,url2], and also pass logoutRedirectUri: the derived default below only works with a single URI. |
logoutRedirectUri | Printed as given. For spa and web, defaults to the base of loginRedirectUri (everything before /callback or /authorization-code/callback) when not set. For native, always pass it. |
signup | "false" shortens the opening paragraph to a single sign-in sentence. |
install | "false" removes the account sign-up and sign-in sentence entirely. |
note | A variable holding Markdown to print right after the Admin Console steps, before the custom-authorization-server steps when both are used. See the ASP.NET Core example. |
customAuthServer | The ID of a custom authorization server, such as default. Adds the access-policy steps and uses the server in the issuer URL. See the last example. |
signup and install are compared as strings, so pass "false" in quotes. The boolean false doesn't match.
Examples
Examples for different app types and frameworks:
- Angular, React, Vue
- Node + Express
- Ionic
- React Native
- Okta Spring Boot Starter
- ASP.NET Core
- Service
- OIDC Debugger
- Custom Authorization Server
Angular
{{ macro.integrator({type: "spa", framework: "Angular", loginRedirectUri: "http://localhost:4200/callback"}) }}
This renders the following:
Before you begin, you'll need an Okta Integrator Free Plan account. To get one, sign up for an Integrator account. Once you have an account, sign in to your Integrator account. Next, in the Admin Console:
Go to Applications and Resources > Applications
Click Create App Integration
In the Sign in Method section, select OIDC - OpenID Connect
Select Single-Page Application as the application type, then click Next
Enter an app integration name
In the Grant type section, ensure that both Authorization Code and Refresh Token are selected
Configure the redirect URIs:
- Sign-in redirect URIs:
http://localhost:4200/callback - Sign-out redirect URIs:
http://localhost:4200
- Sign-in redirect URIs:
In the Assignments section, assign a group or keep the default Everyone group assigned for all
Click Save
Where are my new app's credentials?
Creating an OIDC Single-Page App manually in the Admin Console configures your Okta Org with the application settings. You may also need to configure trusted origins for http://localhost:4200 in Security > API > Trusted Origins.
After creating the app, you can find the configuration details on the app's General tab:
- Client ID: Found in the Client Credentials section
- Issuer: Found in the Issuer URI field for the authorization server that appears by selecting Security > API from the navigation pane.
Issuer: https://dev-133337.okta.com/oauth2/default
Client ID: 0oab8eb55Kb9jdMIr5d6
NOTE: You can also use the Okta PowerShell Module to automate this process. See this guide for more information about setting up your app.
React
{{ macro.integrator({type: "spa", framework: "React", loginRedirectUri: "http://localhost:3000/callback"}) }}
This renders the following:
Before you begin, you'll need an Okta Integrator Free Plan account. To get one, sign up for an Integrator account. Once you have an account, sign in to your Integrator account. Next, in the Admin Console:
Go to Applications and Resources > Applications
Click Create App Integration
In the Sign in Method section, select OIDC - OpenID Connect
Select Single-Page Application as the application type, then click Next
Enter an app integration name
In the Grant type section, ensure that both Authorization Code and Refresh Token are selected
Configure the redirect URIs:
- Sign-in redirect URIs:
http://localhost:3000/callback - Sign-out redirect URIs:
http://localhost:3000
- Sign-in redirect URIs:
In the Assignments section, assign a group or keep the default Everyone group assigned for all
Click Save
Where are my new app's credentials?
Creating an OIDC Single-Page App manually in the Admin Console configures your Okta Org with the application settings. You may also need to configure trusted origins for http://localhost:3000 in Security > API > Trusted Origins.
After creating the app, you can find the configuration details on the app's General tab:
- Client ID: Found in the Client Credentials section
- Issuer: Found in the Issuer URI field for the authorization server that appears by selecting Security > API from the navigation pane.
Issuer: https://dev-133337.okta.com/oauth2/default
Client ID: 0oab8eb55Kb9jdMIr5d6
NOTE: You can also use the Okta PowerShell Module to automate this process. See this guide for more information about setting up your app.
Vue
{{ macro.integrator({type: "spa", framework: "Vue", loginRedirectUri: "http://localhost:8080/callback", signup: "false"}) }}
This renders the following:
Sign in to your Integrator account. Next, in the Admin Console:
Go to Applications and Resources > Applications
Click Create App Integration
In the Sign in Method section, select OIDC - OpenID Connect
Select Single-Page Application as the application type, then click Next
Enter an app integration name
In the Grant type section, ensure that both Authorization Code and Refresh Token are selected
Configure the redirect URIs:
- Sign-in redirect URIs:
http://localhost:8080/callback - Sign-out redirect URIs:
http://localhost:8080
- Sign-in redirect URIs:
In the Assignments section, assign a group or keep the default Everyone group assigned for all
Click Save
Where are my new app's credentials?
Creating an OIDC Single-Page App manually in the Admin Console configures your Okta Org with the application settings. You may also need to configure trusted origins for http://localhost:8080 in Security > API > Trusted Origins.
After creating the app, you can find the configuration details on the app's General tab:
- Client ID: Found in the Client Credentials section
- Issuer: Found in the Issuer URI field for the authorization server that appears by selecting Security > API from the navigation pane.
Issuer: https://dev-133337.okta.com/oauth2/default
Client ID: 0oab8eb55Kb9jdMIr5d6
NOTE: You can also use the Okta PowerShell Module to automate this process. See this guide for more information about setting up your app.
Node + Express
{{ macro.integrator({type: "web", loginRedirectUri: "http://localhost:8080/authorization-code/callback"}) }}
This renders the following:
Before you begin, you'll need an Okta Integrator Free Plan account. To get one, sign up for an Integrator account. Once you have an account, sign in to your Integrator account. Next, in the Admin Console:
Go to Applications and Resources > Applications
Click Create App Integration
In the Sign in Method section, select OIDC - OpenID Connect
Select Web Application as the application type, then click Next
Enter an app integration name
Configure the redirect URIs:
- Sign-in redirect URIs:
http://localhost:8080/authorization-code/callback - Sign-out redirect URIs:
http://localhost:8080
- Sign-in redirect URIs:
In the Assignments section, assign a group or keep the default Everyone group assigned for all
Click Save
Where are my new app's credentials?
Creating an OIDC Web App manually in the Admin Console configures your Okta Org with the application settings.
After creating the app, you can find the configuration details on the app's General tab:
- Client ID: Found in the Client Credentials section
- Client Secret: Click Show in the Client Credentials section to reveal
- Issuer: Found in the Issuer URI field for the authorization server that appears by selecting Security > API from the navigation pane.
You'll need these values for your application configuration:
OKTA_OAUTH2_ISSUER="https://dev-133337.okta.com/oauth2/default"
OKTA_OAUTH2_CLIENT_ID="0oab8eb55Kb9jdMIr5d6"
OKTA_OAUTH2_CLIENT_SECRET="NEVER-SHOW-SECRETS"Your Okta domain is the first part of your issuer, before /oauth2/default.
NOTE: You can also use the Okta PowerShell Module to automate this process. See this guide for more information about setting up your app.
Ionic
{{ macro.integrator({type: "native", loginRedirectUri: "[http://localhost:8100/callback,com.okta.dev-133337:/callback]", logoutRedirectUri: "[http://localhost:8100/logout,com.okta.dev-133337:/logout]"}) }}
This renders the following:
Before you begin, you'll need an Okta Integrator Free Plan account. To get one, sign up for an Integrator account. Once you have an account, sign in to your Integrator account. Next, in the Admin Console:
Go to Applications and Resources > Applications
Click Create App Integration
In the Sign in Method section, select OIDC - OpenID Connect
Select Native Application as the application type, then click Next
Enter an app integration name
Configure the redirect URIs:
- Redirect URI:
[http://localhost:8100/callback,com.okta.dev-133337:/callback] - Post Logout Redirect URI:
[http://localhost:8100/logout,com.okta.dev-133337:/logout](wheredev-133337.okta.comis your Okta domain name). Your domain name is reversed to provide a unique scheme to open your app on a device.
- Redirect URI:
In the Assignments section, assign a group or keep the default Everyone group assigned for all
Click Save
Where are my new app's credentials?
Creating an OIDC Native App manually in the Admin Console configures your Okta Org with the application settings.
After creating the app, you can find the configuration details on the app's General tab:
- Client ID: Found in the Client Credentials section
- Issuer: Found in the Issuer URI field for the authorization server that appears by selecting Security > API from the navigation pane.
Issuer: https://dev-133337.okta.com/oauth2/default
Client ID: 0oab8eb55Kb9jdMIr5d6
NOTE: You can also use the Okta PowerShell Module to automate this process. See this guide for more information about setting up your app.
React Native
{{ macro.integrator({type: "native", loginRedirectUri: "com.okta.dev-133337:/callback", logoutRedirectUri: "com.okta.dev-133337:/callback"}) }}
This renders the following:
Before you begin, you'll need an Okta Integrator Free Plan account. To get one, sign up for an Integrator account. Once you have an account, sign in to your Integrator account. Next, in the Admin Console:
Go to Applications and Resources > Applications
Click Create App Integration
In the Sign in Method section, select OIDC - OpenID Connect
Select Native Application as the application type, then click Next
Enter an app integration name
Configure the redirect URIs:
- Use
com.okta.dev-133337:/callbackfor both the Redirect URI and Post Logout Redirect URI (wheredev-133337.okta.comis your Okta domain name). Your domain name is reversed to provide a unique scheme to open your app on a device.
- Use
In the Assignments section, assign a group or keep the default Everyone group assigned for all
Click Save
Where are my new app's credentials?
Creating an OIDC Native App manually in the Admin Console configures your Okta Org with the application settings.
After creating the app, you can find the configuration details on the app's General tab:
- Client ID: Found in the Client Credentials section
- Issuer: Found in the Issuer URI field for the authorization server that appears by selecting Security > API from the navigation pane.
Issuer: https://dev-133337.okta.com/oauth2/default
Client ID: 0oab8eb55Kb9jdMIr5d6
NOTE: You can also use the Okta PowerShell Module to automate this process. See this guide for more information about setting up your app.
Okta Spring Boot Starter
{{ macro.integrator({type: "web", framework: "Okta Spring Boot Starter"}) }}
This renders the following:
Before you begin, you'll need an Okta Integrator Free Plan account. To get one, sign up for an Integrator account. Once you have an account, sign in to your Integrator account. Next, in the Admin Console:
Go to Applications and Resources > Applications
Click Create App Integration
In the Sign in Method section, select OIDC - OpenID Connect
Select Web Application as the application type, then click Next
Enter an app integration name
Configure the redirect URIs:
- Accept the default redirect URI values:
- Sign-in redirect URIs:
http://localhost:8080/login/oauth2/code/okta - Sign-out redirect URIs:
http://localhost:8080
In the Assignments section, assign a group or keep the default Everyone group assigned for all
Click Save
Where are my new app's credentials?
Creating an OIDC Web App manually in the Admin Console configures your Okta Org with the application settings.
After creating the app, you can find the configuration details on the app's General tab:
- Client ID: Found in the Client Credentials section
- Client Secret: Click Show in the Client Credentials section to reveal
- Issuer: Found in the Issuer URI field for the authorization server that appears by selecting Security > API from the navigation pane.
You'll need these values for your src/main/resources/application.properties file:
okta.oauth2.issuer=https://dev-133337.okta.com/oauth2/default
okta.oauth2.client-id=0oab8eb55Kb9jdMIr5d6
okta.oauth2.client-secret=NEVER-SHOW-SECRETSNOTE: You can also use the Okta PowerShell Module to automate this process. See this guide for more information about setting up your app.
ASP.NET Core
To print a note after the steps, set a variable first and pass it as note:
{% set note %}
> Note that the TCP port 5001 must be the same port used by the application. You can see it in the messages displayed in the terminal when you start the application with **`dotnet run`**.
{% endset %}
{{ macro.integrator({type: "web", framework: "ASP.NET Core", note: note, loginRedirectUri: "http://localhost:5001/authorization-code/callback", logoutRedirectUri: "http://localhost:5001/signout/callback"}) }}
This renders the following:
Before you begin, you'll need an Okta Integrator Free Plan account. To get one, sign up for an Integrator account. Once you have an account, sign in to your Integrator account. Next, in the Admin Console:
Go to Applications and Resources > Applications
Click Create App Integration
In the Sign in Method section, select OIDC - OpenID Connect
Select Web Application as the application type, then click Next
Enter an app integration name
Configure the redirect URIs:
- Sign-in redirect URIs:
http://localhost:5001/authorization-code/callback - Sign-out redirect URIs:
http://localhost:5001/signout/callback
- Sign-in redirect URIs:
In the Assignments section, assign a group or keep the default Everyone group assigned for all
Click Save
Note that the TCP port 5001 must be the same port used by the application. You can see it in the messages displayed in the terminal when you start the application with
dotnet run.
Where are my new app's credentials?
Creating an OIDC Web App manually in the Admin Console configures your Okta Org with the application settings.
After creating the app, you can find the configuration details on the app's General tab:
- Client ID: Found in the Client Credentials section
- Client Secret: Click Show in the Client Credentials section to reveal
- Issuer: Found in the Issuer URI field for the authorization server that appears by selecting Security > API from the navigation pane.
You'll need these values for your application configuration:
OKTA_OAUTH2_ISSUER="https://dev-133337.okta.com/oauth2/default"
OKTA_OAUTH2_CLIENT_ID="0oab8eb55Kb9jdMIr5d6"
OKTA_OAUTH2_CLIENT_SECRET="NEVER-SHOW-SECRETS"Your Okta domain is the first part of your issuer, before /oauth2/default.
NOTE: You can also use the Okta PowerShell Module to automate this process. See this guide for more information about setting up your app.
Service
{{ macro.integrator({type: "service"}) }}
This renders the following:
Before you begin, you'll need an Okta Integrator Free Plan account. To get one, sign up for an Integrator account. Once you have an account, sign in to your Integrator account. Next, in the Admin Console:
Go to Applications and Resources > Applications
Click Create App Integration
In the Sign in Method section, select OIDC - OpenID Connect
Select API Services as the application type, then click Next
Enter an app integration name
In the Assignments section, assign a group or keep the default Everyone group assigned for all
Click Save
Where are my new app's credentials?
Creating an OAuth 2.0 Service App manually in the Admin Console configures your Okta Org with the application settings.
After creating the app, you can find the configuration details on the app's General tab:
- Client ID: Found in the Client Credentials section
- Client Secret: Click Show in the Client Credentials section to reveal
- Issuer: Found in the Issuer URI field for the authorization server that appears by selecting Security > API from the navigation pane.
You'll need these values for your application configuration:
OKTA_OAUTH2_ISSUER="https://dev-133337.okta.com/oauth2/default"
OKTA_OAUTH2_CLIENT_ID="0oab8eb55Kb9jdMIr5d6"
OKTA_OAUTH2_CLIENT_SECRET="NEVER-SHOW-SECRETS"Your Okta domain is the first part of your issuer, before /oauth2/default.
NOTE: You can also use the Okta PowerShell Module to automate this process. See this guide for more information about setting up your app.
OIDC Debugger
oidcdebugger() renders a short paragraph on getting an access token with the OpenID Connect Debugger. It takes an optional responseType, which defaults to code.
{{ macro.oidcdebugger() }}
This renders the following:
An easy way to get an access token is to generate one using OpenID Connect Debugger. Open the site in a new window or tab. Fill in your client ID, and use https://{yourOktaDomain}/oauth2/default/v1/authorize for the Authorize URI. Select code for the response type and Use PKCE.
Custom Authorization Server
When the post needs a custom authorization server instead of the org's default one, add customAuthServer:
{{ macro.integrator({type: "spa", framework: "React", loginRedirectUri: "http://localhost:3000/callback", customAuthServer: "default"}) }}
This renders the following:
Before you begin, you'll need an Okta Integrator Free Plan account. To get one, sign up for an Integrator account. Once you have an account, sign in to your Integrator account. Next, in the Admin Console:
Go to Applications and Resources > Applications
Click Create App Integration
In the Sign in Method section, select OIDC - OpenID Connect
Select Single-Page Application as the application type, then click Next
Enter an app integration name
In the Grant type section, ensure that both Authorization Code and Refresh Token are selected
Configure the redirect URIs:
- Sign-in redirect URIs:
http://localhost:3000/callback - Sign-out redirect URIs:
http://localhost:3000
- Sign-in redirect URIs:
In the Assignments section, assign a group or keep the default Everyone group assigned for all
Click Save
NOTE: When using a custom authorization server, you need to set up authorization policies. Complete these additional steps:
- In the Admin Console, go to Security > API > Authorization Servers
- Select your custom authorization server (
default) - On the Access Policies tab, ensure you have at least one policy:
- If no policies exist, click Add New Access Policy
- Give it a name like "Default Policy"
- Set Assign to to "All clients"
- Click Create Policy
- For your policy, ensure you have at least one rule:
Click Add Rule if no rules exist
Give it a name like "Default Rule"
Set Grant type is to "Authorization Code"
Set User is to "Any user assigned the app"
Set Scopes requested to "Any scopes"
Click Create Rule
For more details, see the Custom Authorization Server documentation.
Where are my new app's credentials?
Creating an OIDC Single-Page App manually in the Admin Console configures your Okta Org with the application settings. You may also need to configure trusted origins for http://localhost:3000 in Security > API > Trusted Origins.
After creating the app, you can find the configuration details on the app's General tab:
- Client ID: Found in the Client Credentials section
- Issuer: Found in the Issuer URI field for the authorization server that appears by selecting Security > API from the navigation pane.
Issuer: https://dev-133337.okta.com/oauth2/default
Client ID: 0oab8eb55Kb9jdMIr5d6
NOTE: You can also use the Okta PowerShell Module to automate this process. See this guide for more information about setting up your app.