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

Battle.net Provider

리소스

설정

Callback URL

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

환경 변수

AUTH_BATTLENET_ID
AUTH_BATTLENET_SECRET
AUTH_BATTLENET_ISSUER

issuer는 사용 가능한 지역에 따라 다음 값 중 하나여야 합니다:

type BattleNetIssuer =
| "https://www.battlenet.com.cn/oauth"
| "https://us.battle.net/oauth"
| "https://eu.battle.net/oauth"
| "https://kr.battle.net/oauth"
| "https://tw.battle.net/oauth"

설정

/auth.ts
import NextAuth from "next-auth";
import BattleNet from "next-auth/providers/battlenet";
 
export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [BattleNet({
    clientId: AUTH_BATTLENET_CLIENT_ID
    clientSecret: AUTH_BATTLENET_CLIENT_SECRET
    issuer: AUTH_BATTLENET_ISSUER
  })]
});
Auth.js © Balázs Orbán and Team - 2025