Ztrust Provider
Resources
Setup
Callback URL
https://example.com/api/auth/callback/ztrustEnvironment Variables
AUTH_ZTRUST_ID
AUTH_ZTRUST_SECRET
AUTH_ZTRUST_ISSUERConfiguration
/auth.ts
import NextAuth from "next-auth"
import Ztrust from "next-auth/providers/ztrust"
export const { handlers, auth, signIn, signOut } = NextAuth({
providers: [Ztrust],
})Enable the “Client Authentication” option to retrieve your client secret in the Credentials tab.
Prior to v20, create an openid-connect client in ztrust with “confidential” as the “Access Type”.
- Issuer should include the realm – e.g.
https://my-ztrust-domain.com/realms/My_Realm