Authentik 供應商
資源
設定
回呼 URL
https://example.com/api/auth/callback/authentik
環境變數
AUTH_AUTHENTIK_ID
AUTH_AUTHENTIK_SECRET
AUTH_AUTHENTIK_ISSUER
組態
/auth.ts
import NextAuth from "next-auth";
import Authentik from "next-auth/providers/authentik";
export const { handlers, auth, signIn, signOut } = NextAuth({
providers: [Authentik({
clientId: AUTH_AUTHENTIK_CLIENT_ID
clientSecret: AUTH_AUTHENTIK_CLIENT_SECRET
issuer: AUTH_AUTHENTIK_ISSUER
})]
});
💡
issuer 應包含 slug,且不含尾隨斜線 – 例如,https://my-authentik-domain.com/application/o/My_Slug