Skip to content

Quickstart with Next.js

This document assumes you have already created a tenant and configured your login box with Iridium.

First, we need to register your Next.js application with in Iridium.

Select “Application Management” from the side menu.

Navigate to Application Management

Select “Create Application”

Create Application

Add the following values to the modal that pops up.

  • Application Type: Single Page Application
  • Application Name: ${YOUR_APPLICATION_NAME}
  • Homepage URL: http://localhost:3000
  • Authorization Callback URL: http://localhost:3000/callback

After the application is created, make sure to save the client ID for future reference.

Current Applications

Next, clone the Iridium Next.js starter application and cd into the folder.

$ git clone
$ cd /iridium-nextjs-example

Create the environment file for Next.js to read your Iridium properties from.

$  touch .env.local

Open the file with a text editor of your choice and enter the below as the contents.

  • Replace “ENTER_YOUR_TENANT_NAME_HERE” with the tenant name you created earlier
  • Replace “ENTER_YOUR_CLIENT_ID_HERE” with the application id generated earlier

Run your application

$ npm install && npm run dev

Navigate to localhost:3000, select login in the right of the screen

Login From Client App

You should be redirected to your personalized login domain. Select “Login With GitHub”

Login with GitHub

You’ll be redirected to GitHub. The view should show details specific to the application you registered with GitHub.

Authorize Your App

(If you ever want to revoke the gitHub authorization, refer to this documentation)

Select “Authorize ${your-github-name}” and you should be redirected back to your Next.js application with confirmation of successful authorization.

Successful Authorization

Congratulations, you have successfully registered and secured a Next.js application with Iridium!

This project is still in its early stages, we’d like you to join us.

If you have any comments, questions, or concerns (maybe a new framework client built for you) join the community:
* GitHub Discussions. * Discord.