Skip to content
Migrating from NextAuth.js v4? Read our migration guide.
API reference
osu

providers/osu

Built-in osu! integration.

OsuProfile

Extends

Properties

avatar_url

avatar_url: string;
Inherited from

OsuUserCompact.avatar_url

country

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

country_code

country_code: string;
Inherited from

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;
Inherited from

OsuUserCompact.default_group

discord

discord: null | string;

has_supported

has_supported: boolean;

id

id: string;
Inherited from

OsuUserCompact.id

interests

interests: null | string;

is_active

is_active: boolean;
Inherited from

OsuUserCompact.is_active

is_bot

is_bot: boolean;
Inherited from

OsuUserCompact.is_bot

is_deleted

is_deleted: boolean;
Inherited from

OsuUserCompact.is_deleted

is_online

is_online: boolean;
Inherited from

OsuUserCompact.is_online

is_restricted

is_restricted: boolean;

is_supporter

is_supporter: boolean;
Inherited from

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;
Inherited from

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;
Inherited from

OsuUserCompact.pm_friends_only

post_count

post_count: number;

profile_colour

profile_colour: null | string;
Inherited from

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;
Inherited from

OsuUserCompact.username

website

website: null | string;

OsuUserCompact

Extended by

Properties

avatar_url

avatar_url: string;

country_code

country_code: string;

default_group

default_group: string;

id

id: string;

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>

Add osu! login to your page.

Setup

Callback URL

https://example.com/api/auth/callback/osu

Configuration

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 })],
})

Resources

Notes

By default, Auth.js assumes that the Osu provider is based on the OAuth 2 specification.

osu! does not provide a user email.

💡

The osu! provider comes with a default configuration. To override the defaults for your use case, check out customizing a built-in OAuth provider.

Disclaimer If you think you found a bug in the default configuration, you can open an issue.

Auth.js strictly adheres to the specification and it cannot take responsibility for any deviation from the spec by the provider. You can open an issue, but if the problem is non-compliance with the spec, we might not pursue a resolution. You can ask for more help in Discussions.

Type parameters

Type parameter
P extends OsuProfile

Parameters

ParameterType
optionsOAuthUserConfig<P>

Returns

OAuthConfig<P>

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