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
this issue is mentioned here , as after update they added some additional parameter to sign an 'ordinary' or 'illegal' string.
Checkout here - https://stackoverflow.com/a/75033994/19933510
this issue is mentioned here , as after update they added some additional parameter to sign an 'ordinary' or 'illegal' string.
Checkout here - https://stackoverflow.com/a/75033994/19933510
I hope this works well for guys and maybe can close this thread.
this issue is mentioned here , as after update they added some additional parameter to sign an 'ordinary' or 'illegal' string.
Checkout here - https://stackoverflow.com/a/75033994/19933510
I hope this works well for guys and maybe can close this thread.
In my Vue2 application I only use the jwt.verify method. The proposed fix does not work for me. My tokens are signed in the backend with version 9
this issue is mentioned here , as after update they added some additional parameter to sign an 'ordinary' or 'illegal' string.
Checkout here - https://stackoverflow.com/a/75033994/19933510
I hope this works well for guys and maybe can close this thread.
In my Vue2 application I only use the jwt.verify method. The proposed fix does not work for me. My tokens are signed in the backend with version 9
As per code example you are using an string 'fooSecret' which may not be correct as per v9 they added some strict rules for generating token so when we use older method it's breaking. Please if you got any lead help me out also about how this works as they demands more of proper values and their types as per docs.
this issue is mentioned here , as after update they added some additional parameter to sign an 'ordinary' or 'illegal' string.
Checkout here - https://stackoverflow.com/a/75033994/19933510
I hope this works well for guys and maybe can close this thread.
In my Vue2 application I only use the jwt.verify method. The proposed fix does not work for me. My tokens are signed in the backend with version 9
As per code example you are using an string 'fooSecret' which may not be correct as per v9 they added some strict rules for generating token so when we use older method it's breaking. Please if you got any lead help me out also about how this works as they demands more of proper values and their types as per docs.
I don't see any answer to the problem in the documentation.
In the backend my token is signed with version 9 of jsonwebtoken in the following way: jwt.sign(payload, this.privateKey, {expiresIn: '1h'})
In Vue2 frontend the token is decoded with version 8.5 of jsonwebtoken in the following way: jwt.verify(token, publicKey)
And it works.
But if I upgrade to version 9 I get the error invalid 'instanceof' operand KeyObject
this issue is mentioned here , as after update they added some additional parameter to sign an 'ordinary' or 'illegal' string.
Checkout here - https://stackoverflow.com/a/75033994/19933510
I hope this works well for guys and maybe can close this thread.
In my Vue2 application I only use the jwt.verify method. The proposed fix does not work for me. My tokens are signed in the backend with version 9
As per code example you are using an string 'fooSecret' which may not be correct as per v9 they added some strict rules for generating token so when we use older method it's breaking. Please if you got any lead help me out also about how this works as they demands more of proper values and their types as per docs.
I don't see any answer to the problem in the documentation.
In the backend my token is signed with version 9 of jsonwebtoken in the following way: jwt.sign(payload, this.privateKey, {expiresIn: '1h'})
In Vue2 frontend the token is decoded with version 8.5 of jsonwebtoken in the following way: jwt.verify(token, publicKey)
And it works.
But if I upgrade to version 9 I get the error invalid 'instanceof' operand KeyObject
So issue is when you're verifying, is it generating token perfectly. If you sign any illegal key in v9 it'll show same error. As i used it in next.js not tried in vue.
As I have understood jsonwebtoken package is not designed for browsers and you should use packages that designed for client-side as such jwt.io javaScript libraries
As I have understood jsonwebtoken package is not designed for browsers and you should use packages that designed for client-side as such jwt.io javaScript libraries
That's what I did. I opted for jwt-decode and jwt-encode
Activity
josephdburdick commentedon Dec 10, 2023
Also facing the same issue.
QBT-VinayAdiga commentedon Dec 14, 2023
Same issue after updating to v9
rajeshrah22 commentedon Dec 26, 2023
I might take a look
pranavajk1 commentedon Jan 24, 2024
Yes I am also facing the same issue
loicGR commentedon Feb 9, 2024
I am also facing the same issue in my Vue2 app. It works with version 8.5.1 but not with 9.0.0.
milinddhamu commentedon Feb 9, 2024
this issue is mentioned here , as after update they added some additional parameter to sign an 'ordinary' or 'illegal' string.
Checkout here - https://stackoverflow.com/a/75033994/19933510
milinddhamu commentedon Feb 14, 2024
I hope this works well for guys and maybe can close this thread.
loicGR commentedon Feb 15, 2024
In my Vue2 application I only use the jwt.verify method. The proposed fix does not work for me. My tokens are signed in the backend with version 9
milinddhamu commentedon Feb 15, 2024
As per code example you are using an string 'fooSecret' which may not be correct as per v9 they added some strict rules for generating token so when we use older method it's breaking. Please if you got any lead help me out also about how this works as they demands more of proper values and their types as per docs.
Check this out at - https://github.com/auth0/node-jsonwebtoken/wiki/Migration-Notes:-v8-to-v9
loicGR commentedon Feb 16, 2024
I don't see any answer to the problem in the documentation.
In the backend my token is signed with version 9 of jsonwebtoken in the following way:
jwt.sign(payload, this.privateKey, {expiresIn: '1h'})In Vue2 frontend the token is decoded with version 8.5 of jsonwebtoken in the following way:
jwt.verify(token, publicKey)And it works.
But if I upgrade to version 9 I get the error invalid 'instanceof' operand KeyObject
milinddhamu commentedon Feb 16, 2024
So issue is when you're verifying, is it generating token perfectly. If you sign any illegal key in v9 it'll show same error. As i used it in next.js not tried in vue.
adamsocrat commentedon Mar 20, 2024
As I have understood jsonwebtoken package is not designed for browsers and you should use packages that designed for client-side as such jwt.io javaScript libraries
loicGR commentedon Mar 20, 2024
That's what I did. I opted for jwt-decode and jwt-encode
(AOP) CS-298: AOP Vite Upgrade (#293)