-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type error while using expiresIn
in signAsync
#1369
Labels
Comments
PRs are more than welcome 🙏 |
@kamilmysliwiec Assign this to me please |
aayushchugh
added a commit
to aayushchugh/nestjs-jwt
that referenced
this issue
Jul 17, 2023
removed unused @ts-expect-error fixes nestjs#1369
12 tasks
Does your code run in JsonWebToken doesn't allow you use payload as string and set a "invalid" options, such as: See /jsonwebtoken/sign.js |
@Hender-hs My code was working in |
why don't we fix that |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is there an existing issue for this?
Current behavior
I am not able to use
expiresIn
option while signing a tokenGetting error
In following code
Code for module
I can use
expiresIn
inJwtModule.register()
but now while using it in serviceMinimum reproduction code
https://github.com/maya-manager/server/blob/aayushchugh/login/src/modules/auth/auth.service.ts#L164-L167
Steps to reproduce
No response
Expected behavior
I should be able to use
expiresIn
without any type errorsPackage version
10.1.0
NestJS version
10.0.5
Node.js version
18.15.0
In which operating systems have you tested?
Other
Also, VScode is only showing autocomplete for these 2 options
Here there are two
signAsync
and in the upper one you are usingOmit
. I thinkOmit
is removing all the types fromSignOptions
and I can't useexpiresIn
The text was updated successfully, but these errors were encountered: