Register an OpenID Connect single-page app


# Register an OpenID Connect single-page app

To add login to your single-page application with Asgardeo, you need to first register your app in Asgardeo.

Your app will be registered as an OpenID Connect single-page app and a client ID will be issued. Note that client secrets are not issued because single-page apps are public clients. However, the PKCE (Proof Key for Code Exchange) extension is enabled by default as a security measure.

Follow the instructions given below.

# Register the app

To register the app:

  1. On the Asgardeo console (opens new window), go to Develop > Applications.

  2. Click New Application and select Single-Page Application to open the following:

    Select an app type
  3. Enter the following details:

    Create a new SPA
    Parameter Description
    Name A unique name to identify your application.
    Authorized redirect URLs

    The URL to which the authorization code is sent to upon user authentication and where the user is redirected to upon logout.

    Click Add Now if you want to try a sample app.
  4. Click Register to complete the registration.

# Disable PKCE (optional)

This single-page application you registered is configured with the OpenID Connect Authorization Code Grant with PKCE (opens new window).

If your app does not support PKCE, you can disable it as follows:

  1. Go to the Protocol tab of your application.
  2. Clear the PKCE Mandatory setting.

# Get the client ID

When you register your single-page application, a client ID is generated. Your application will identify itself to Asgardeo with this client ID.

You can get this client ID from the Protocol tab of the application as shown below.

Get client ID of SPA

# What's next?