Skip to content
需要从 NextAuth.js v4 升级到最新版本吗?请查阅 版本升级指南

Descope Provider

Resources

Setup

Callback URL

https://example.com/api/auth/callback/descope

Environment Variables

AUTH_DESCOPE_ID
AUTH_DESCOPE_SECRET
AUTH_DESCOPE_ISSUER

Configuration

Follow these steps:

  1. Log into the Descope console
  2. Follow the OIDC instructions

Add the required environment variables from above to your .env.local file.

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

Using Descope Widgets

If you wish to use Descope Widgets with NextAuth.js, you will have to wrap your NextAuth.js components with our Next.js SDK and <AuthProvider>.

For more information on this, please look at our documentation here.