state
param is not included in the Typescript interface for AuthenticateOptions
#595
Closed
2 tasks done
Prerequisites
Fastify version
4.x
Plugin version
No response
Node.js version
18.x
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Ubuntu 22.04
Description
This is a Typescript bug.
When using the Passport Google Oauth2 package to implement a Google auth strategy, we are unable to pass the
state
property though thepassport.authenticate
options object.This works code-wise, but does not compile because the interface definition for AuthenticateOptions does not include
state
.Working non-TS example here
This is basically an extension of #376 that only appears when devs have the misfortune of using typescript.
Steps to Reproduce
Example code:
When swapping the commented out lines we get varying errors that
state
is not defined on the interface for either theSingleStrategyCallback
orAuthenticateOptions
.Example:
Object literal may only specify known properties, and 'state' does not exist in type 'AuthenticateOptions'.
Expected Behavior
A Typescript developer can pass a
state
property through theAuthenticateOptions
object without error.The text was updated successfully, but these errors were encountered: