Answer the question
In order to leave comments, you need to log in
Is it possible to do Flask authentication this way?
On a certain page, the client enters a name and password.
When you click send data for verification, the Client first receives some random key via AJAX (string that Flask stuffs into session['token']) and this key is hashed through JS sha256: username+password+randomkey.
The resulting hash is submitted by the form and Flask checks-scans the user table for a combination match:
hashlib.sha256(user+pass+session['token']).hexdigest()
session['login']=True
if session.get('login') !=True: return redirect(url_for('login'))
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