providers/osu
OsuProfile
扩展
OsuUserCompact.Record<string,any>
属性
avatar_url
avatar_url: string;继承自
国家
country: {
code: string;
name: string;
};代码
code: string;姓名
name: string;国家代码
country_code: string;继承自
封面
cover: {
custom_url: null | string;
id: null | number;
url: string;
};自定义 URL
custom_url: null | string;id
id: null | number;URL
url: string;默认组
default_group: string;继承自
discord
discord: null | string;是否已支持
has_supported: boolean;id
id: number;继承自
兴趣
interests: null | string;是否激活
is_active: boolean;继承自
是否为机器人
is_bot: boolean;继承自
是否已删除
is_deleted: boolean;继承自
是否在线
is_online: boolean;继承自
是否限制
is_restricted: boolean;是否为支持者
is_supporter: boolean;继承自
加入日期
join_date: Date;kudosu
kudosu: {
available: number;
total: number;
};可用
available: number;总数
total: number;最后访问
last_visit: null | Date;继承自
位置
location: null | string;max_blocks
max_blocks: number;max_friends
max_friends: number;职业
occupation: null | string;游戏模式
playmode: string;游戏风格
playstyle: string[];pm_friends_only
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
扩展自
属性
头像 URL
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
pm_friends_only: boolean;个人资料颜色
profile_colour: null | string;用户名
username: string;默认()
default<P>(options): OAuthConfig<P>将 osu! 登录添加到您的页面。
设置
回调 URL
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 |
参数
| 参数 | 类型 |
|---|---|
options | OAuthUserConfig<P> |
返回值
OAuthConfig<P>