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 extends GitLabProfile |
パラメーター
パラメーター | 型 |
---|---|
options | OAuthUserConfig <P > |
戻り値
OAuthConfig
<P
>