Skip to content
The Auth.js project is now part of Better Auth.

ThunderID Provider

Resources

Setup

Callback URL

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

Environment Variables

AUTH_THUNDERID_ID
AUTH_THUNDERID_SECRET
AUTH_THUNDERID_ISSUER

Configuration

  1. Get ThunderID installed on your environment. (via npx thunderid or any other option)
  2. Go to the ThunderID Console at https://{THUNDERID_HOST}:{THUNDERID_PORT}/console
  3. Create an application with the Next.js template

    ⚠️ IMPORTANT: Make sure to copy the Client Secret at the end of the wizard since it will not be prompted again

  4. In the General tab, Access section → Authorized redirect URIs, add:
    • Development: http://localhost:3000/api/auth/callback/thunderid
    • Production: https://{YOUR_DOMAIN}/api/auth/callback/thunderid

Then, add the values to your environment variables.

/auth.ts
import NextAuth from "next-auth"
import ThunderID from "next-auth/providers/thunderid"
 
export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [ThunderID],
})
Auth.js © Better Auth Inc. - 2026