跳到內容
正在從 NextAuth.js v4 遷移?請閱讀 我們的遷移指南.

providers/passage

內建的 Passage by 1Password 整合。

PassageProfile

參見

支援的範圍

屬性

at_hash

at_hash: string;

aud

aud: string[];

auth_time

auth_time: number;

azp

azp: string;

c_hash

c_hash: string;

client_id

client_id: string;

email

email: string;

使用者的電子郵件地址

email_verified

email_verified: boolean;

使用者是否已驗證其電子郵件地址

exp

exp: number;

iat

iat: number;

iss

iss: string;

phone

phone: string;

使用者的電話號碼

phone_number_verified

phone_number_verified: boolean;

使用者是否已驗證其電話號碼

sub

sub: string;

使用者在 Passage 中的唯一識別碼


default()

default(config): OAuthConfig<PassageProfile>

將 Passage 登入新增至您的頁面。

設定

回呼網址

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

設定

import { Auth } from "@auth/core"
import Passage from "@auth/core/providers/passage"
 
const request = new Request(origin)
const response = await Auth(request, {
  providers: [
    Passage({
      clientId: PASSAGE_ID,
      clientSecret: PASSAGE_SECRET,
      issuer: PASSAGE_ISSUER,
    }),
  ],
})

資源

注意事項

預設情況下,Auth.js 假設 Passage 提供者基於 Open ID Connect 規範。

💡

Passage 提供者具有預設設定。若要覆寫您的使用案例的預設值,請查看自訂內建 OAuth 提供者

免責聲明如果您認為您在預設設定中發現錯誤,您可以開啟問題

Auth.js 嚴格遵守規範,對於提供者偏離規範的任何行為概不負責。您可以開啟問題,但如果問題是不符合規範,我們可能不會尋求解決方案。您可以在討論中尋求更多協助。

參數

參數類型
configOAuthUserConfig<PassageProfile>

回傳值

OAuthConfig<PassageProfile>

Auth.js © Balázs Orbán 及團隊 -2024