providers/authentik
AuthentikProfile
繼承自
Record
<string
,any
>
屬性
acr
acr: string;
at_hash
at_hash: string;
aud
aud: string;
auth_time
auth_time: number;
c_hash
c_hash: string;
email: string;
email_verified
email_verified: boolean;
exp
exp: number;
family_name
family_name: string;
given_name
given_name: string;
groups
groups: string[];
iat
iat: number;
iss
iss: string;
name
name: string;
nickname
nickname: string;
nonce
nonce: string;
preferred_username
preferred_username: string;
sub
sub: string;
default()
default<P>(options): OAuthConfig<P>
將 Authentik 登入新增至您的頁面。
設定
回調網址
https://example.com/api/auth/callback/authentik
設定
import { Auth } from "@auth/core"
import Authentik from "@auth/core/providers/authentik"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
Authentik({
clientId: AUTHENTIK_CLIENT_ID,
clientSecret: AUTHENTIK_CLIENT_SECRET,
issuer: AUTHENTIK_ISSUER,
}),
],
})
issuer 應該包含沒有尾隨斜線的 slug – 例如,https://my-authentik-domain.com/application/o/My_Slug
資源
注意事項
根據預設,Auth.js 假設 Authentik 提供者基於 Open ID Connect 規範。
💡
Authentik 提供者具有預設設定。若要覆寫您使用案例的預設值,請查看自訂內建的 OAuth 提供者。
免責聲明 如果您認為在預設設定中發現錯誤,您可以開啟一個 issue。
Auth.js 嚴格遵守規範,並且不對提供者偏離規範的任何行為負責。您可以開啟一個 issue,但如果問題是不符合規範,我們可能不會尋求解決方案。您可以在討論區中尋求更多協助。
類型參數
類型參數 |
---|
P extends AuthentikProfile |
參數
參數 | 類型 |
---|---|
options | OAuthUserConfig <P > |
回傳
OAuthConfig
<P
>