Create an Okta app integration
On This Page
Before you can sign a user in, you need to create an Okta app integration that represents your single-page application.
Sign in to your Okta organization with your administrator account.
From the Admin Console side navigation, click Applications > Applications.
Click Add Application and then Create New App.
Pick Single-Page App (SPA) as the platform and click Create.
Note: It is important to choose the appropriate application type for apps which are public clients. Failing to do so may result in Okta API endpoints attempting to verify an app's client secret, which public clients are not designed to have, hence breaking the sign-in or sign-out flow.
Enter a name for your app integration (or leave the default value).
Enter values for the Login redirect URI. This is the callback from Define a callback route. Add values for local development (for example,
http://localhost:8080/authentication/login-callbackfor Blazor) and production (for example,
Include a URI in the Initiate login URI box to have Okta initiate the sign-in flow. When Okta redirects to this endpoint (for example,
https://example:0000.com/login), the client is triggered to send an authorize request. This URI is also used when users reset their passwords while signing in to the app. Okta redirects the user back to this URI after the password is reset so that the user can continue to sign in.
Click Save to finish creating the Okta app integration.
On the General tab, scroll to General Settings and click Edit.
In the Allowed grant types, make sure that Authorization Code and Refresh Token are selected.
This enables PKCE flow for your application and the ability to refresh the access token when it expires without prompting the user to reauthenticate. Refresh token rotation is automatically set as the default refresh token behavior.
Note: The default number of seconds for the Grace period for token rotation is set to 30 seconds. You can change the value to any number between 0 and 60 seconds. After the refresh token is rotated, the previous token remains valid for this amount of time to allow clients to get the new token. Using a value of 0 indicates that there is no grace period.
XMLHttpRequest to the Okta API with the Okta session cookie. For instructions on setting trusted origins, see Grant cross-origin access to websites.
Note: You should only grant access to specific origins (websites) that you control and trust to access the Okta API.