we need to use const jwt = require(‘jsonwebtoken’); package to genrte token for using API we are not allowed to use external code rather need to built this in Kore using script node but getting error require not defined any ways in which wecan make this working in Kore script node?
observed the same , any solution you got?
Hello Vedant,
Welcome to Kore.ai Community.
Please note, the require
function and external libraries, such as jsonwebtoken
, cannot be utilized directly in Kore.ai’s Script Node since the platform does not support importing external Node.js modules or packages.
However, you can implement token generation within the Script Node using plain JavaScript, provided the necessary cryptographic operations for JWT are handled natively.
Hope this helps.
Thank you,
Srujan Madderla
Kore.ai Community Team