chameleonbr/node-red-contrib-jwt

Environmental Variable/ Parameters for Client_Secret

ram1505 opened this issue · 2 comments

Actually, I've the client_secret in my global variable. How can I use this global variable with the JWT_SIGN node? I'm using a pre-shared key and therefore my payload will have a client_secret which is then stored in a global variable. When I use the JWT_SIGN node, with HS256, it asks me to enter either a "secret" property on the node text input field or use an environmental variable NODE_RED_NODE_JWT_SECRET. Please help. Can I somehow use my global variable without having to enter the secret each time on the property of the node?

Originally posted by @ram1505 in #2 (comment)

Hi,
Would appreciate if you could advise how I can pass the access_token (my "Secret") into this node using a function node instead of the Secret Property on the UI.

I would second @ram1505 to optionally allow for the secret to be passed in the msg, or alternatively be able to define which environment variable name to use instead of hardwired NODE_RED_NODE_JWT_SECRET

Thanks for these nodes btw.