Skip to content
Migrating from NextAuth.js v4? Read our migration guide.
Getting Started
Providers
Duende Identity Server6

Duende Identity Server Provider

Resources

Setup

Callback URL

https://example.com/api/auth/callback/duende-identity-service

Environment Variables

AUTH_DUENDE_IDENTITY_SERVER6_ID
AUTH_DUENDE_IDENTITY_SERVER6_SECRET
AUTH_DUENDE_IDENTITY_SERVER6_ISSUER

Configuration

/auth.ts
import NextAuth from "next-auth"
import DuendeIdentityServer6 from "next-auth/providers/duende-identity-server6"
 
export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [DuendeIdentityServer6],
})

Demo IdentityServer

The configuration below is for the demo server at https://demo.duendesoftware.com/

If you want to try it out, you can copy and paste the configuration below.

You can sign in to the demo service with either bob/bob or alice/alice.

import DuendeIDS6Provider from "next-auth/providers/duende-identity-server6"
providers: [
  DuendeIDS6Provider({
    clientId: "interactive.confidential",
    clientSecret: "secret",
    issuer: "https://demo.duendesoftware.com",
  }),
]
Auth.js © Balázs Orbán and Team - 2024