providers/nextcloud
NextcloudProfile
代表從 /ocs/v1.php/cloud/users/
返回的 Nextcloud 使用者個人資料資料。
參閱
繼承
Record
<string
,any
>
屬性
address
address: string;
使用者的地址。
範例
"Foobar 12, 12345 Town"
biography
biography: string;
使用者的個人簡介或詳細描述。
displayname
displayname: string;
使用者的顯示名稱。
範例
"Frank K."
email: null | string;
與使用者關聯的電子郵件地址。
範例
"frank@domain.tld"
enabled
enabled: boolean;
指示是否啟用或停用使用者帳戶。
範例
true
fediverse
fediverse: string;
使用者的 Fediverse 帳號。
groups
groups: string[];
使用者所屬的群組名稱陣列。
範例
["admin", "group1", "group2"]
headline
headline: string;
使用者的標題或簡短描述。
id
id: string;
使用者的使用者名稱。
範例
"frank"
language
language: string;
使用者的語言偏好。
範例
"en"
locale
locale: string;
使用者的地區設定或語言地區設定。
範例
"en_US"
organisation
organisation: string;
與使用者關聯的組織。
phone
phone: string;
使用者的電話號碼。
role
role: string;
使用者的角色或職位。
storageLocation
storageLocation: string;
使用者檔案的儲存位置。
範例
"/path/to/nextcloud/data/frank"
twitter: string;
使用者的 Twitter 帳號。
範例
"Nextcloud"
website
website: string;
使用者的網站 URL。
範例
"https://nextcloud.com"
default()
default(options): OAuthConfig<NextcloudProfile>
將 Nextcloud 登入新增至您的頁面。
設定
回調 URL
https://example.com/auth/callback/nextcloud
設定
import { Auth } from "@auth/core"
import Nextcloud from "@auth/core/providers/nextcloud"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
Nextcloud({ clientId: AUTH_NEXTCLOUD_ID, clientSecret: AUTH_NEXTCLOUD_SECRET, issuer: AUTH_NEXTCLOUD_ISSUER }),
],
})
資源
注意事項
預設情況下,Auth.js 假設 Nextcloud 提供者是基於 OAuth 2 規範。
💡
Nextcloud 提供者帶有預設配置。若要覆寫預設值以符合您的使用案例,請查看自訂內建的 OAuth 提供者。
參數
參數 | 類型 |
---|---|
選項 | OAuthUserConfig <NextcloudProfile > |