providers/gitlab
GitLabProfile
繼承自
Record
<string
,any
>
屬性
avatar_url
avatar_url: string;
bio
bio: string;
bot
bot: boolean;
can_create_group
can_create_group: boolean;
can_create_project
can_create_project: boolean;
color_scheme_id
color_scheme_id: number;
commit_email
commit_email: string;
confirmed_at
confirmed_at: string;
created_at
created_at: string;
current_sign_in_at
current_sign_in_at: string;
email: string;
external
external: boolean;
extra_shared_runners_minutes_limit
extra_shared_runners_minutes_limit: number;
followers
followers: number;
following
following: number;
id
id: number;
identities
identities: {
extern_uid: string;
provider: string;
}[];
job_title
job_title: string;
last_activity_on
last_activity_on: string;
last_sign_in_at
last_sign_in_at: string;
linkedin: string;
local_time
local_time: string;
location?
optional location: string;
name
name: string;
organization
organization: string;
private_profile
private_profile: boolean;
projects_limit
projects_limit: number;
pronouns
pronouns: string;
public_email
public_email: string;
shared_runners_minutes_limit
shared_runners_minutes_limit: number;
skype
skype: string;
state
state: string;
theme_id
theme_id: number;
twitter: string;
two_factor_enabled
two_factor_enabled: boolean;
username
username: string;
web_url
web_url: string;
website_url
website_url: string;
work_information?
optional work_information: string;
default()
default<P>(options): OAuthConfig<P>
將 GitLab 登入新增到您的頁面。
設定
回調 URL
https://example.com/api/auth/callback/gitlab
組態
import { Auth } from "@auth/core"
import GitLab from "@auth/core/providers/gitlab"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
GitLab({ clientId: GITLAB_CLIENT_ID, clientSecret: GITLAB_CLIENT_SECRET }),
],
})
資源
注意事項
預設情況下,Auth.js 假設 GitLab 提供者是基於 OAuth 2 規範。
💡
如果您想在註冊時儲存使用者的電子郵件地址,請在範圍中啟用 read_user
選項。
💡
GitLab 提供者具有預設組態。若要覆寫您的使用案例的預設值,請查看自訂內建 OAuth 提供者。
類型參數
類型參數 |
---|
P 擴充自 GitLabProfile |
參數
參數 | 類型 |
---|---|
options | OAuthUserConfig <P > |
回傳
OAuthConfig
<P
>