Skip to content
Migrating from NextAuth.js v4? Read our migration guide.
Getting Started
Providers
Bungie

Bungie Provider

Resources

Setup

Callback URL

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

Environment Variables

AUTH_BUNGIE_ID
AUTH_BUNGIE_SECRET
AUTH_BUNGIE_API_KEY

Configuration

Navigate to https://www.bungie.net/en/Application and fill in the required details:

  • Application name
  • Application Status
  • Website
  • OAuth Client Type
    • Confidential
  • Redirect URL
  • Scope
    • Access items like your Bungie.net notifications, memberships, and recent Bungie.Net forum activity.
  • Origin Header
/auth.ts
import NextAuth from "next-auth";
import Bungie from "next-auth/providers/boxyhq-saml";
 
export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [
    Bungie({
      clientId: AUTH_BUNGIE_ID
      clientSecret: AUTH_BUNGIE_SECRET
      headers: { "X-API-Key": AUTH_BUNGIE_API_KEY }
    }),
  ],
});

Notes

  • Bungie requires all clients to be using https.
  • Bungie does not allow the hostname localhost, so for local development, you must use 127.0.0.1 for example
Auth.js © Balázs Orbán and Team - 2024