nextauthjs / nextauthjs/next-auth
Bungie Provider and Typescript / Does this provider even work?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28.4k
- Forks
- 4k
- PR merge metrics
- No merged PRs in 30d
Description
Question 💬
I followed the example for adding the Bungie provider here. After doing so I found that the default implementation isn't happy with Typescript.
Argument of type '{ clientId: string; clientSecret: string; headers: { "X-API-Key": string; }; }' is not assignable to parameter of type 'Partial<OAuthConfig<any>>'.
Object literal may only specify known properties, and 'headers' does not exist in type 'Partial<OAuthConfig<any>>'.
What is the intended setup when using Typescript with this provider?
How to reproduce ☕️
- Create a typescript application using
create t3 app - Select nextAuth and Typescript at least
- Go to the src/server/auth.ts file
- Locate the provider section
- Copy/Paste default provider implementation from provider docs
Contributing 🙌🏽
No, I am afraid I cannot help regarding this.
Unless it is as simple as changing the default to this:
BungieProvider({
clientId: env.BUNGIE_CLIENT_ID,
clientSecret: env.BUNGIE_SECRET,
httpOptions: {
headers: {
"X-API-Key": env.BUNGIE_API_KEY
}
}
}),
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Bungie provider example in the linked provider documentation and the provider section in src/server/auth.ts. Reproduce the TypeScript error using the create t3 app steps, then verify the intended configuration and confirm that the documented example works without a type error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, typescript
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100