Descope Provider
Resources
Setup
Callback URL
https://example.com/api/auth/callback/descopeEnvironment Variables
AUTH_DESCOPE_ID
AUTH_DESCOPE_SECRET
Configuration
Follow these steps:
- Log into the Descope console
- 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({
clientId: process.env.AUTH_DESCOPE_ID,
clientSecret: process.env.AUTH_DESCOPE_SECRET,
checks: ["pkce", "state"],
})]
})