How to encrypt with md5 after vue login?

question 1: isn"t md5 encryption irreversible? If I encrypt it, how can the back end decrypt it? How to judge the user name and face it correctly?

question 2: do I have to write encryption for every request? This is too troublesome, how to package better?

Mar.22,2021

first login encryption should not be all the data. I think it should be an encrypted password, and then the backend should give the corresponding token
with token when you request the interface


question 1. The backend does not need to decrypt, but only needs to compare the md5 passed by the front end. Question 2. After logging in, you need to save the state after login, which involves the signature mechanism. This can not be explained clearly in one or two sentences. It is suggested that the subject should know about oauth2,jwt and other knowledge.

Menu