Following the get started documentation, the setAuthCookies function requires the req and res only, when playing this code using typescript it expects a third argument, that is a object that can receive a token property.
I suggest to make the whole options object as optional to not be required passing a empty object when using the function without passing any options.
reviewing the source code, I guest that just add a "?" to the user property on the line 16 will solve it
Following the
get started
documentation, the setAuthCookies function requires thereq
andres
only, when playing this code using typescript it expects a third argument, that is a object that can receive a token property.I suggest to make the whole options object as optional to not be required passing a empty object when using the function without passing any options. reviewing the source code, I guest that just add a "?" to the user property on the line 16 will solve it