passport typescript type conflict
See original GitHub issueTrying to use this package along with a custom passport strategy with express.
Issue is that this package includes the definitions from express-jwt, which are causing issues with projects that include both passport and node-jwks-rsa.
https://github.com/DefinitelyTyped/DefinitelyTyped/issues/23976
Any recommendations to resolve this conflict of the Request.user
type?
node_modules/@types/express-jwt/index.d.ts(43,13): error TS2717: Subsequent property declarations must have the same type. Property 'user' must be of type 'User | undefined', but here has type 'any'.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Override module declaration of passport set by third party ...
This is giving my a typescript error with overloading, ... Argument of type '"azuread-openidconnect"' is not assignable to parameter of type ...
Read more >@types/passport - npm
Start using @types/passport in your project by running `npm i ... TypeScript icon, indicating that this package has built-in type ...
Read more >Extending Express' Types with TypeScript Declaration Merging
To keep it simple, let's imagine we have some middleware (e.g. passport) that makes the current user available on each request, in the...
Read more >Documentation: Strategies - Passport.js
Strategies are responsible for authenticating requests, which they accomplish by implementing an authentication mechanism. Authentication mechanisms define how ...
Read more >Use TypeScript to Build a Node API with Express
Request type. Installing @types/passport and assing "passport" to the "types" list of tsconfig.json fixed it ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure @joshcanhelp!
You can grab the following repo/branch: https://github.com/coralproject/talk/pull/1743
That currently, will throw the following error:
PR submitted: DefinitelyTyped/DefinitelyTyped#27339