[Flask] [flask][bcrypt] Help with Password hash

Jeff Widman jeff at jeffwidman.com
Wed Jul 22 20:44:58 CEST 2015


You may find `check_password_hash` from werkzeug helpful.

Just modify this code snippet a little so it pulls the hash from your
config.py file: http://flask.pocoo.org/snippets/54/

If you're just trying to lockdown the entire application, you can just set
a password in nginx or apache. Or use nginx/apache to password protect in
everything in /admin. It's a little more brittle since you're managing
password security in a different piece of software, but for quick and dirty
when you just need to protect a prototype before it goes live it's probably
faster.


On Wed, Jul 22, 2015 at 8:28 AM, David Baumgold <david at davidbaumgold.com>
wrote:

> Does this help? https://github.com/maxcountryman/flask-bcrypt
>
> From: itsmeshantanu <itsmeshantanu at hotmail.com>
> <itsmeshantanu at hotmail.com>
> Reply: itsmeshantanu <itsmeshantanu at hotmail.com>>
> <itsmeshantanu at hotmail.com>
> Date: July 22, 2015 at 11:27:19 AM
> To: flask at python.org <flask at python.org>> <flask at python.org>
> Subject:  [Flask] [flask][bcrypt] Help with Password hash
>
>  Hello,
> I am trying to using bcrypt  to hash my password for an application. Right
> now i am just comparing the password in the form directly with a string
> 'default' but i want to make an admin password with hash. Where should this
> configuration be? I have a config.py where csrf and secret key are located
> and i think this is the file where i could keep a default password for
> anyone to access the app for now.
> I went through the documentation but i am confused.
>
>
>
>
>
>  Sent from Samsung mobile
>  _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
>
>
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
>
>


-- 

*Jeff Widman*
jeffwidman.com <http://www.jeffwidman.com/> | 740-WIDMAN-J (943-6265)
<><
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20150722/d6d24aa7/attachment.html>


More information about the Flask mailing list