Answer the question
In order to leave comments, you need to log in
How to organize an authentication algorithm using JWT?
I can’t figure out how to use JWT , let’s say JavaScript generates a token on the client, here is the implementation . The server receives the data and verifies it, for example .
The problem is that I want to use asymmetric encryption, and with this method, the server must store the secret in an explicit, not hashed form.
I imagined it differently: when registering, the user creates a pair of keys using JavaScript, the public one of which is sent to the server and it stores it to decrypt the jwt. Tell me where I'm wrong.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question