You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I instanciate a new Strategy object in Typescript and I use this object in passport.use(), it raises an error from the typescript transpiler on the new Strategy line as follows:
Argument of type 'Strategy<unknown, Client>' is not assignable to parameter of type 'Strategy'.
Property 'authenticate' is missing in type 'Strategy<unknown, Client>' but required in type 'Strategy'.
Expected behaviour
I don't know what it should do but I was using the exact same code in openid-client@3.3.0 and since I updated the package to 3.7.1 I have this error. When I override the typescript definition of the openid-client Strategy with an authenticate attribute, it works as expected. I don't know if it is really a bug or if I misunderstood something.
I think it's not relevant to show the code that calls this class to instanciate the Strategy and the parameters, as the bug is not related to a particular behaviour after it is executed, as it does not compile.
Environment:
openid-client version: v3.7.1
node version: v12.2.0
Additional context
i have searched the issues tracker on github for similar issues and couldn't find anything related.
the bug is happening on latest openid-client too.
The text was updated successfully, but these errors were encountered:
Tenshock
changed the title
new Strategy raises errors from Typescript transpiler when used in passport.use()
new Strategy raises an error from Typescript transpiler when used in passport.use()
Sep 13, 2019
Describe the bug
When I instanciate a new Strategy object in Typescript and I use this object in passport.use(), it raises an error from the typescript transpiler on the
new Strategy
line as follows:To Reproduce
Issuer and Client configuration:
Steps to reproduce the behaviour:
tsc
Expected behaviour
I don't know what it should do but I was using the exact same code in openid-client@3.3.0 and since I updated the package to 3.7.1 I have this error. When I override the typescript definition of the openid-client Strategy with an
authenticate
attribute, it works as expected. I don't know if it is really a bug or if I misunderstood something.I think it's not relevant to show the code that calls this class to instanciate the Strategy and the parameters, as the bug is not related to a particular behaviour after it is executed, as it does not compile.
Environment:
Additional context
The text was updated successfully, but these errors were encountered: