What is the best secure way to get a JWT token from a node server from a javascript app without using a form?
问题 In my case, I have a React app (using Next ) that need to use an API provided by a node / express / mysql app. My idea was to have an endpoint ( /login ) to provide a JWT Token based on user / password (that check the user in the database and create token based on the id of the user) and then use the JWT token to use the API endpoints (those token are stored in the mysql as well). But in order to do that, and because there is no form, I would have to store the credentials ( user and password