Hey,
Using the standard django auth, if I currently try to login as a user and observer the request in the console, I see the user/password in plain text:
My login form:
from django.contrib.auth.forms import AuthenticationForm
from django.forms.widgets import TextInput, PasswordInput
from django import forms
class MyAuthForm(AuthenticationForm):
username = forms.CharField(widget=TextInput(attrs={"placeholder":"Votre nom d'utilisateur", "type":"text", "class":"form-control form-control-user", "id":"id_username"}))
password = forms.CharField(widget=PasswordInput(attrs={"placeholder":"Votre mot de passe", "type":"password", "class":"form-control form-control-user", "id":"id_password"}))
And the template:
<form class="user" action="{% url 'registration:login' %}" method="post">
{% csrf_token %}
{% for field in form%}
{{field}}
{% endfor %}
<input type="submit" class="btn btn-primary btn-user btn-block" value="login">
</form>
The frontend is straight jquery. Any good way to:
- send an encrypted version of that login info to the server so it doesn’t travel as plain text in the network
- have that encrypted string work out well server-side for auth