Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

RuntimeError: The configuration value SECURITY_PASSWORD_SALT must not be None when the value of SECURITY_PASSWORD_HASH is set to "bcrypt" #759

Closed
eliaperantoni opened this issue Feb 21, 2018 · 3 comments

Comments

@eliaperantoni
Copy link

eliaperantoni commented Feb 21, 2018

I've tried running the example script at https://pythonhosted.org/Flask-Security/quickstart.html#id1 but when I open the url I get this error

RuntimeError: The configuration value `SECURITY_PASSWORD_SALT` must not be None when the value of `SECURITY_PASSWORD_HASH` is set to "bcrypt"

What am I doing wrong?
Is settings the security password hash config to bcrypt.gensalt() on startup a good idea?

@biomap
Copy link
Contributor

biomap commented Feb 27, 2018

You need to set SECURITY_PASSWORD_SALT in your configuration settings as it indicates in the traceback.

@iPadGuy
Copy link

iPadGuy commented Dec 3, 2019

SUGGESTION: Add the SECURITY_PASSWORD_SALT to the QuickStart. I can't recomend this software if the QuickStart doesn't even work.

Thanks!

@jwag956
Copy link

jwag956 commented Dec 3, 2019

@iPadGuy FYI - in my maintained fork - it is there in addition to actually showing how to generate a good SALT and SECRET_KEY.

https://flask-security-too.readthedocs.io/en/stable/quickstart.html

jasco pushed a commit to jasco/flask-security that referenced this issue Oct 3, 2023
When changing from @app.before_first_request which Flask deprecated, the entire DB initial setup was placed in the __main__ block - thus using flask run to start the examples didn't work.

closes pallets-eco#759
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants