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

providers/wca

Built-in World Cube Association integration.

WCAProfile

See

Get the authenticated user

Properties

me

me: {
  avatar: {
     can_edit_thumbnail: boolean;
     id: null | number;
     is_default: boolean;
     status: string;
     thumb_url: string;
     thumbnail_crop_h: number;
     thumbnail_crop_w: number;
     thumbnail_crop_x: number;
     thumbnail_crop_y: number;
     url: string;
    };
  class: string;
  country: {
     continent_id: string;
     id: string;
     iso2: string;
     name: string;
    };
  country_iso2: string;
  created_at: string;
  delegate_status: null | string;
  email: string;
  gender: string;
  id: number;
  name: string;
  teams: any[];
  updated_at: string;
  url: string;
  wca_id: null | string;
};
avatar
avatar: {
  can_edit_thumbnail: boolean;
  id: null | number;
  is_default: boolean;
  status: string;
  thumb_url: string;
  thumbnail_crop_h: number;
  thumbnail_crop_w: number;
  thumbnail_crop_x: number;
  thumbnail_crop_y: number;
  url: string;
};
avatar.can_edit_thumbnail
avatar.can_edit_thumbnail: boolean;
avatar.id
avatar.id: null | number;
avatar.is_default
avatar.is_default: boolean;
avatar.status
avatar.status: string;
avatar.thumb_url
avatar.thumb_url: string;
avatar.thumbnail_crop_h
avatar.thumbnail_crop_h: number;
avatar.thumbnail_crop_w
avatar.thumbnail_crop_w: number;
avatar.thumbnail_crop_x
avatar.thumbnail_crop_x: number;
avatar.thumbnail_crop_y
avatar.thumbnail_crop_y: number;
avatar.url
avatar.url: string;
class
class: string;
country
country: {
  continent_id: string;
  id: string;
  iso2: string;
  name: string;
};
country.continent_id
country.continent_id: string;
country.id
country.id: string;
country.iso2
country.iso2: string;
country.name
country.name: string;
country_iso2
country_iso2: string;
created_at
created_at: string;
delegate_status
delegate_status: null | string;
email
email: string;
gender
gender: string;
id
id: number;
name
name: string;
teams
teams: any[];
updated_at
updated_at: string;
url
url: string;
wca_id
wca_id: null | string;

default()

function default(config): OAuthConfig<WCAProfile>

Add WCA login to your page and make requests to WCA APIs.

Setup

Callback URL

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

Configuration

import { Auth } from "@auth/core"
import Wca from "@auth/core/providers/wca"
 
const request = new Request(origin)
const response = await Auth(request, {
  providers: [
    Wca({ clientId: WCA_CLIENT_ID, clientSecret: WCA_CLIENT_SECRET }),
  ],
})

Resources

Notes

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

💡

The WCA 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.

Parameters

ParameterType
configOAuthUserConfig<WCAProfile>

Returns

OAuthConfig<WCAProfile>

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