コンテンツにスキップ
NextAuth.js v4 からの移行ですか?こちらを読んでください 移行ガイド.

providers/osu

組み込みのosu!統合。

OsuProfile

拡張

プロパティ

avatar_url

avatar_url: string;
継承元

OsuUserCompact.avatar_url

country

country: {
  code: string;
  name: string;
};
code
code: string;
name
name: string;

country_code

country_code: string;
継承元

OsuUserCompact.country_code

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;
継承元

OsuUserCompact.default_group

discord

discord: null | string;

has_supported

has_supported: boolean;

id

id: number;
継承元

OsuUserCompact.id

interests

interests: null | string;

is_active

is_active: boolean;
継承元

OsuUserCompact.is_active

is_bot

is_bot: boolean;
継承元

OsuUserCompact.is_bot

is_deleted

is_deleted: boolean;
継承元

OsuUserCompact.is_deleted

is_online

is_online: boolean;
継承元

OsuUserCompact.is_online

is_restricted

is_restricted: boolean;

is_supporter

is_supporter: boolean;
継承元

OsuUserCompact.is_supporter

join_date

join_date: Date;

kudosu

kudosu: {
  available: number;
  total: number;
};
available
available: number;
total
total: number;

last_visit

last_visit: null | Date;
継承元

OsuUserCompact.last_visit

location

location: null | string;

max_blocks

max_blocks: number;

max_friends

max_friends: number;

occupation

occupation: null | string;

playmode

playmode: string;

playstyle

playstyle: string[];

pm_friends_only

pm_friends_only: boolean;
継承元

OsuUserCompact.pm_friends_only

post_count

post_count: number;

profile_colour

profile_colour: null | string;
継承元

OsuUserCompact.profile_colour

profile_order

profile_order: string[];

title

title: null | string;

title_url

title_url: null | string;

twitter

twitter: null | string;

username

username: string;
継承元

OsuUserCompact.username

website

website: null | string;

OsuUserCompact

拡張元

プロパティ

avatar_url

avatar_url: string;

country_code

country_code: string;

default_group

default_group: string;

id

id: number;

is_active

is_active: boolean;

is_bot

is_bot: boolean;

is_deleted

is_deleted: boolean;

is_online

is_online: boolean;

is_supporter

is_supporter: boolean;

last_visit

last_visit: null | Date;

pm_friends_only

pm_friends_only: boolean;

profile_colour

profile_colour: null | string;

username

username: string;

default()

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 プロバイダーのカスタマイズをご覧ください。

免責事項 デフォルト設定にバグがあると思われる場合は、問題をオープンできます。

Auth.js は仕様に厳密に従っており、プロバイダーによる仕様からの逸脱について責任を負うことはできません。問題をオープンすることはできますが、問題が仕様に準拠していない場合は、解決を追求しない可能性があります。ディスカッションでさらにサポートを求めることができます。

型パラメータ

型パラメータ
P extends OsuProfile

パラメータ

パラメータ
optionsOAuthUserConfig<P>

戻り値

OAuthConfig<P>

Auth.js © Balázs Orbán and Team -2024