This code is from Cory Schafer's tutorial series on youtube:
https://www.youtube.com/watch?v=MwZwr5Tvyxo&list=PL-osiE80TeTs4UjLw5MM6OjgkjFeUxCYH
It demonstrates how to build a Python Flask web app with registration & login via oath, routing, database integration and more.
To run app for yourself:
- Clone repository
- Pip install requirements.txt
- Update .env_sample with your info and rename to .env
- The secret_key is used by WTForms to prevent CSRF attacks and also for serializing our password reset tokens
- the token_hex function from the secrets module is an easy way to generate your secret key
- Use your own email address and pw for the email server (used for pw reset emails). NOTE: You may need to enable "less secure apps" access to your email temporarily if you receive a warning.
- Run the app:
$ python run.py