I have created vue components for login and registration. How do I send password to the server?? Should I just encrypt the password using bcrypt
on the client side and then send it to Laravel or should I just send the plain password to Laravel and use bcrypt($request->get('password'));
What would be a good option?
If I should encrypt the password in the vue component, what package/function should I use so that it will encrypt the password in the same way as Laravel/PHP does??
A showPassword flag controls whether or not the user is working with a type="text" or type="password" input control. Type in the password field and press the eye icon to show or hide the password.
The Promise object is used for asynchronous computations. A Promise represents a value which may be available now, or in the future, or never. A callback is any executable code that is passed as an argument to other code, which is expected to call back (execute) the argument at a given time.
It is not really need to encrypt the password in your javascript code. It is more important to serve your PHP on a HTTPS server.
The data sending between browser and your web server will be encrypted by the SSL/TLS cert.
Here are some guides to setup a HTTPS enabled web server, I assume your php is hosted on NGINX or Apache with php-fpm or apache php modules.
With letsencrypt, it provides a free SSL/TLS cert for your web server to secure the communication between client browser and itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With