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
I'm developping a front-end application with Vite and Vue3.
I tried jsonwebtoken first but I had some problems with Node's polyfill, for utils, Buffer, etc.
So now I'm using this wonderful lib to replace jsonwebtoken, simply to sign a token from a secret string, without encryption, and I struggled a few minutes to find how to use it in the browser. The key was simply to use TextEncoder.
So, maybe you could add this simple use case to the documentation :
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm developping a front-end application with Vite and Vue3.
I tried jsonwebtoken first but I had some problems with Node's polyfill, for utils, Buffer, etc.
So now I'm using this wonderful lib to replace jsonwebtoken, simply to sign a token from a secret string, without encryption, and I struggled a few minutes to find how to use it in the browser. The key was simply to use TextEncoder.
So, maybe you could add this simple use case to the documentation :
Regards,
--
Pierre
Beta Was this translation helpful? Give feedback.
All reactions