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 Teamspace application as a Next Application.
- Sign up for a free Asgardeo account
- Sign into Asgardeo console and navigate to Applications > New Application.
-
Select Next.js
-
complete the wizard popup by providing a suitable name and an authorized redirect URL.
Example
Name: Teamspace
Authorized redirect URL: http://localhost:3000
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, as the sample application will be accessible at this URL
-
Make a note of the following values from the Guide tab of the registered application. You will need them to configure the Asgardeo provider.
NEXT_PUBLIC_ASGARDEO_BASE_URL="https://api.asgardeo.io/t/<your-org-name>" NEXT_PUBLIC_ASGARDEO_CLIENT_ID="<your-app-client-id>" ASGARDEO_CLIENT_SECRET="<your-app-client-secret>" -
Navigate to the 'Shared Access' tab and select 'Share with all organizations'.
Allow required grant types¶
To ensure seamless authentication and authorization in the Teamspace application, you must allow the necessary OAuth2 grant types in Asgardeo. These grant types allow your app to authenticate users, retrieve access tokens, and interact with Asgardeo’s APIs securely.
Required Grant Types for Teamspace¶
Based on the features we are expecting to implement, the following grant types are enabled:
- Authorization Code Grant – Used for user authentication and obtaining access tokens interactively.
- Client Credentials Grant – Allows the app to make API calls on behalf of the organization (used for retrieving a root organization token).
- Organization Switch Grant – Enables switching between organizations.
How to Enable Grant Types¶
- Navigate to your application in the Asgardeo console.
- Click on "Protocols" tab
- Allow the above grant types and update
Info
Read more on OAuth2 grant types



