We added the JSONWebToken js library to our javascript action node. In short what it does:
JsonWebToken is a JavaScript library for creating and checking JWTs (JSON Web Tokens). A JWT is a small, digitally signed piece of text that proves who someone is, similar to a wristband you get at an event: it shows you have been let in, staff can check it instantly, and it cannot be faked or altered without being noticed.
It is most often used for logins. When a user signs in, the server gives them a token. The user’s app sends that token back with every request, and the server can instantly verify it is genuine and not expired, without needing to look anything up in a database.
Tokens can be read by anyone, but not changed by anyone. Only the server with the secret key can create a valid one, so they should never contain passwords or private data.