Can I use jsonwebtoken node package in a Liferay web content template?

Alla Sapozhnikova, modified 1 Year ago. Junior Member Posts: 82 Join Date: 3/2/12 Recent Posts

Hi there,

I'm currently attempting to embed a page in Liferay, and to accomplish this, I need to generate a token. I have a JavaScript script that works on the server, but it doesn't seem to function when used in the Liferay web content template. To use the jsonwebtoken package I use

var jwt = require("jsonwebtoken");

Is there a method to utilize a Node.js package within a Liferay web content template?

Thank you in advance for any suggestions you can offer.

Best regards,

Alla