providers/osu
OsuProfile
繼承自
OsuUserCompact
.Record
<string
,any
>
屬性
avatar_url
avatar_url: string;
繼承自
country
country: {
code: string;
name: string;
};
code
code: string;
name
name: string;
country_code
country_code: string;
繼承自
cover
cover: {
custom_url: null | string;
id: null | number;
url: string;
};
custom_url
custom_url: null | string;
id
id: null | number;
url
url: string;
default_group
default_group: string;
繼承自
discord
discord: null | string;
has_supported
has_supported: boolean;
id
id: number;
繼承自
interests
interests: null | string;
is_active
is_active: boolean;
繼承自
is_bot
is_bot: boolean;
繼承自
is_deleted
is_deleted: boolean;
繼承自
is_online
is_online: boolean;
繼承自
is_restricted
is_restricted: boolean;
is_supporter
is_supporter: boolean;
繼承自
join_date
join_date: Date;
kudosu
kudosu: {
available: number;
total: number;
};
available
available: number;
total
total: number;
last_visit
last_visit: null | Date;
繼承自
location
location: null | string;
max_blocks
max_blocks: number;
max_friends
max_friends: number;
職業
occupation: null | string;
遊玩模式
playmode: string;
遊玩風格
playstyle: string[];
僅限好友私訊
pm_friends_only: boolean;
繼承自
OsuUserCompact
.pm_friends_only
發文數
post_count: number;
個人檔案顏色
profile_colour: null | string;
繼承自
個人檔案排序
profile_order: string[];
標題
title: null | string;
標題網址
title_url: null | string;
推特
twitter: null | string;
使用者名稱
username: string;
繼承自
網站
website: null | string;
OsuUserCompact
擴展自
屬性
頭像網址
avatar_url: string;
國家代碼
country_code: string;
預設群組
default_group: string;
ID
id: number;
是否啟用
is_active: boolean;
是否為機器人
is_bot: boolean;
是否已刪除
is_deleted: boolean;
是否在線
is_online: boolean;
是否為贊助者
is_supporter: boolean;
上次訪問時間
last_visit: null | Date;
僅限好友私訊
pm_friends_only: boolean;
個人檔案顏色
profile_colour: null | string;
使用者名稱
username: string;
預設值()
default<P>(options): OAuthConfig<P>
將 osu! 登入功能加入您的頁面。
設定
回調網址
https://example.com/api/auth/callback/osu
組態設定
import { Auth } from "@auth/core"
import Osu from "@auth/core/providers/osu"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
Osu({ clientId: OSU_CLIENT_ID, clientSecret: OSU_CLIENT_SECRET }),
],
})
資源
注意事項
預設情況下,Auth.js 假設 Osu 提供者基於 OAuth 2 規範。
osu! 不提供使用者電子郵件。
💡
osu! 提供者帶有預設組態。若要覆寫您使用案例的預設值,請查看自訂內建 OAuth 提供者。
型別參數
型別參數 |
---|
P 繼承自 OsuProfile |
參數
參數 | 型別 |
---|---|
選項 | OAuthUserConfig <P > |
返回
OAuthConfig
<P
>