How to make a login system in Javascript?

后端 未结 3 1400
天命终不由人
天命终不由人 2021-01-25 11:25

I am trying to make a simple login system in javascript. The code should be for multiple users

e.g: user: love pass: cat, user2: mom pass2: love etc.

I need the

3条回答
  •  终归单人心
    2021-01-25 12:22

    You should NEVER, EVER do the username/password check in the client side, since anyone could just view the source of your javascript file and find the password pattern or even just bypass it easily. you will ALWAYS want to send the username/password to the server and have the server redirect it for you

提交回复
热议问题