Re: [flask] [Flask Login] How do we authenticate the user?
- Darren Worrall
- 2012-08-01 @ 07:10
On 1 August 2012 06:54, Mahesh Lal <firstname.lastname@example.org> wrote:
> I was planning to use the flask-login plugin to manage user related
> functions and was faced with one basic question - how do u validate whether
> its a legitimate user?
> I do see a @load_user callback - which will load a user given an id,
> however, if a user is entering a mail_id (in this case it is the user id)
> and a password where do I check whether the password entered is correct for
> the said user?
> Please advise.
> *-- REGARDS*
> MAHESH LAL*
You login the user in the view which accepts the POST from your login form,
see the 'How it works' section in the documentation for an example: