Register an application in Asgardeo
2 min

First unless you already have done that, you need to create an organization in Asgardeo and register your application as a single page application.

  • Sign up for a free Asgardeo account
  • Sign into Asgardeo console and navigate to Applications > New Application.
  • Select Traditional Web Application (Make sure that the protocol remains set to OpenID Connect (OIDC))

Select Traditional Page Application

Next, complete the wizard popup by providing a suitable name and an authorized redirect URL.

Example

name: asgardeo-nextjs

Authorized redirect URL: http://localhost:3000/api/auth/callback/asgardeo

Register a new application

Info

The authorized redirect URL determines where Asgardeo should send users after they successfully log in. Typically, this will be the web address where your application is hosted. For this guide, we'll use http://localhost:3000/api/auth/callback/asgardeo, as the sample application will be accessible at this URL

Make a note of the following values from the Protocol and Info tabs of the registered application. You will need them to configure Asgardeo provider for Auth.js.

  • client-id from the Protocol tab.
  • client-secret from the Protocol tab.
  • issuer from from the Info tab.

In this step, we have ve registered our Next.js app as an application in the Asgardeo console and generated the required metadata. Next, we will create a Next.js app.