Post login action, call API with jwt encrypted data

Hi, is this possible.

I’ve looked at both jwt-decode and express-jwt.

Scenario: to call an API from post-login script securely. The idea is to generate a JWT string from a JSON string and a secret, send to API using Axios. The API will decode the JWT string using the shared secret to obtain the JSON string.

Is there an available js/node package that can be used in a post-login action to sign a json string with a secret?

Hey @Kush1 !

I recommend taking a look at the jsonwebtoken library - It should get you what you’re looking for :slight_smile:

Hey @tyf , thank you. I thought I was bound by Can I require? - Search which node modules you can use in webtask.io

I missed adding the package as a dependency. Thank you for the reply, it helped me work it out :slight_smile:

1 Like

Awesome, thanks for confirming!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.