Hey friends! After much research by different blogs I was able to do a project with nodejs and jwt where I can register a user and also grant him a token to consume a top secret service.
This is all new to me, but it seems very interesting, so I'll go for more ... I will bring more content soon.
I leave you the source code so that you can play, eye occupy global variables with .env, so when you download the repository you have to create in the root of the project a file called .env, inside define the variables you want to use! bye!