providers/mattermost
MattermostProfile
プロパティ
auth_data
auth_data: string;
auth_service
auth_service: string;
create_at
create_at: number;
ユーザーが作成された時刻(ミリ秒単位)
delete_at
delete_at: number;
ユーザーが削除された時刻(ミリ秒単位)
disable_welcome_email
disable_welcome_email: boolean;
メール
email: string;
email_verified
email_verified: boolean;
first_name
first_name: string;
id
id: string;
last_name
last_name: string;
last_password_update
last_password_update: number;
locale
locale: string;
nickname
nickname: string;
notify_props
notify_props: {
channel: string;
comments: string;
desktop: string;
desktop_sound: string;
desktop_threads: string;
email: string;
email_threads: string;
first_name: string;
mention_keys: string;
push: string;
push_status: string;
push_threads: string;
};
channel
channel: string;
チャンネル全体の通知(@channel、@allなど)を有効にする場合は「true」、無効にする場合は「false」に設定します。デフォルトは「true」です。
comments
comments: string;
desktop
desktop: string;
すべてのアクティビティに対してデスクトップ通知を受信する場合は「all」、メンションとダイレクトメッセージのみの場合は「mention」、無効にする場合は「none」に設定します。デフォルトは「all」です。
desktop_sound
desktop_sound: string;
デスクトップ通知でサウンドを有効にする場合は「true」、無効にする場合は「false」に設定します。デフォルトは「true」です。
desktop_threads
desktop_threads: string;
メール
email: string;
メール通知を有効にする場合は「true」、無効にする場合は「false」に設定します。デフォルトは「true」です。
email_threads
email_threads: string;
first_name
first_name: string;
ファーストネームに対するメンションを有効にする場合は「true」に設定します。ファーストネームが設定されている場合はデフォルトで「true」、それ以外の場合は「false」です。
mention_keys
mention_keys: string;
メンションとしてカウントする単語をカンマ区切りでリストします。デフォルトはusernameと@usernameです。
push
push: string;
すべてのアクティビティに対してプッシュ通知を受信する場合は「all」、メンションとダイレクトメッセージのみの場合は「mention」、無効にする場合は「none」に設定します。デフォルトは「mention」です。
push_status
push_status: string;
push_threads
push_threads: string;
position
position: string;
roles
roles: string;
terms_of_service_create_at?
optional terms_of_service_create_at: number;
ユーザーが利用規約に同意した時刻(ミリ秒単位)
terms_of_service_id?
optional terms_of_service_id: string;
同意した利用規約のID(存在する場合)。このフィールドが空の場合は表示されません。
timezone
timezone: {
automaticTimezone: string;
manualTimezone: string;
useAutomaticTimezone: string;
};
automaticTimezone
automaticTimezone: string;
「useAutomaticTimezone」が「true」に設定されている場合、この値は自動的に設定されます。
manualTimezone
manualTimezone: string;
手動でタイムゾーンを設定する場合の値(例:「Europe/Berlin」)。
useAutomaticTimezone
useAutomaticTimezone: string;
ブラウザ/システムのタイムゾーンを使用する場合は「true」、手動で設定する場合は「false」に設定します。デフォルトは「true」です。
update_at
update_at: number;
ユーザーが最後に更新された時刻(ミリ秒単位)
username
username: string;
default()
default<P>(config): OAuthConfig<P>
Mattermostログインをページに追加します。
セットアップ
コールバックURL
https://example.com/api/auth/callback/mattermost
設定
import { Auth } from "@auth/core"
import Mattermost from "@auth/core/providers/mattermost"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
Mattermost({
clientId: MATTERMOST_CLIENT_ID,
clientSecret: MATTERMOST_CLIENT_SECRET,
issuer: MATTERMOST_ISSUER, // The base url of your Mattermost instance. e.g `https://my-cool-server.cloud.mattermost.com`
}),
],
})
リソース
注意事項
デフォルトでは、Auth.jsはMattermostプロバイダーがOAuth 2仕様に基づいていると想定しています。
Mattermost OAuth2アプリを作成するには、http://<あなたのMattermostインスタンスURL>/<あなたのチーム>/integrations/oauth2-apps
にアクセスしてください。
Mattermostプロバイダーを使用するには、issuer
オプションの設定が必要です。これは、MattermostインスタンスのベースURLです。例:https://my-cool-server.cloud.mattermost.com
Mattermostプロバイダーには、デフォルト設定が付属しています。ユースケースに合わせてデフォルトを上書きするには、組み込みOAuthプロバイダーのカスタマイズをご確認ください。
免責事項 デフォルト設定にバグを発見したと思われる場合は、Issueを作成してください。
Auth.jsは仕様に厳密に従っており、プロバイダーによる仕様からの逸脱について責任を負うことはできません。Issueを作成することはできますが、問題が仕様への準拠ではない場合、解決を追求しない可能性があります。Discussionsで詳しいサポートを求めることができます。
型パラメータ
型パラメータ |
---|
P extends MattermostProfile |
パラメータ
パラメータ | 型 |
---|---|
config | OAuthUserConfig <P > & { issuer : string ; } |
戻り値
OAuthConfig
<P
>