Joel.Watson92@gmail.com | LinkedIn: /in/joel3rbear | Twitter: @Joel3rBear
Basic Authorization is used when the user enters their username+password. Bearer Authentication is used after the initial Basic or OAuth authentication by supplying the bearer token recieved after basic authorization.
The JSON Web Token package allows developers to create signed and encrypted tokens and to verify those tokens, so that they can securely pass information between two systems (server, client, etc.)
We should consider that it needs to be consistent accross all jwt signatures and should be kept secure by storing it in a .env file and accessing it through the process.env.
More info at JSONWebToken Docs