Skip to content

fix(providers): fix Bungie provider TypeScript and X-API-Key header - #13490

Open
tahiraltundag wants to merge 1 commit into
nextauthjs:mainfrom
tahiraltundag:fix/bungie-provider-typescript
Open

tahiraltundag wants to merge 1 commit into
nextauthjs:mainfrom
tahiraltundag:fix/bungie-provider-typescript

Conversation

@tahiraltundag

Copy link
Copy Markdown

Fixes #6930

Problem

  • Bungie provider docs show headers: { "X-API-Key": BUNGIE_API_KEY } but TypeScript type OAuthUserConfig does not allow headers, causing TS error
  • Provider used plain string userinfo without sending X-API-Key header, so Bungie API rejects userinfo request (login fails)

Solution

  • Extend Bungie options type to allow headers?: Record<string, string>
  • Convert userinfo from string to object with custom request that sends X-API-Key header and builds correct URL using membership_id from tokens
  • Fixes TypeScript error and makes Bungie sign-in work

Tested with pnpm lint (no errors) and tsc check.

Fixes nextauthjs#6930

- Allow headers option with X-API-Key in Bungie provider options to fix TypeScript error
- Convert userinfo from string to object with custom request that sends X-API-Key header
- Handle membershipId from tokens to build correct userinfo URL
@vercel

vercel Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
auth-docs Error Error Aug 31, 2026 10:37am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
next-auth-docs Ignored Ignored Preview Aug 31, 2026 10:37am

Request Review

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@tahiraltundag is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

This branch had an error being deployed

1 failed deployment
Preview – auth-docs — ef5be96c Deployed Aug 31, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Refers to `@auth/core` providers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bungie Provider and Typescript / Does this provider even work?

1 participant