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
TypeError: Right hand side of instanceof is not an object
at /home/mohammad/Desktop/JWT auth/node_modules/jsonwebtoken/sign.js:114:38
at /home/mohammad/Desktop/JWT auth/app.js:25:0
at processTicksAndRejections (:1:2602)
109 |
110 | if (!secretOrPrivateKey && options.algorithm !== 'none') {
111 | return failure(new Error('secretOrPrivateKey must have a value'));
112 | }
113 |
114 | if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) {
^
Additional information
No response
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.0.0
What platform is your computer?
Linux 6.2.0-32-generic x86_64 x86_64
What steps can reproduce the bug?
using this code in a simple express app built with bun
jwt.sign({ id: "xx" }, process.env.TOKEN_SECRET_KEY, { expiresIn: "1h", });
What is the expected behavior?
the expected bahavior is to provide a jwt token
What do you see instead?
instead i get the error down bellow
TypeError: Right hand side of instanceof is not an object
at /home/mohammad/Desktop/JWT auth/node_modules/jsonwebtoken/sign.js:114:38
at /home/mohammad/Desktop/JWT auth/app.js:25:0
at processTicksAndRejections (:1:2602)
109 |
110 | if (!secretOrPrivateKey && options.algorithm !== 'none') {
111 | return failure(new Error('secretOrPrivateKey must have a value'));
112 | }
113 |
114 | if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) {
^
Additional information
No response
The text was updated successfully, but these errors were encountered: