Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miguelgrinberg/microblog-verify
Microblog application from the Flask Mega-Tutorial with added two-factor authentication via the Twilio Verify API.
https://github.com/miguelgrinberg/microblog-verify
authentication flask twilio twilio-verify two-factor-authentication
Last synced: 10 days ago
JSON representation
Microblog application from the Flask Mega-Tutorial with added two-factor authentication via the Twilio Verify API.
- Host: GitHub
- URL: https://github.com/miguelgrinberg/microblog-verify
- Owner: miguelgrinberg
- License: mit
- Created: 2019-11-27T11:50:39.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T11:35:09.000Z (about 2 years ago)
- Last Synced: 2024-05-22T09:05:32.463Z (7 months ago)
- Topics: authentication, flask, twilio, twilio-verify, two-factor-authentication
- Language: Python
- Homepage:
- Size: 46.9 KB
- Stars: 28
- Watchers: 3
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Welcome to Microblog-Verify!
This is the example application featured in my [Flask Mega-Tutorial](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world), to which I've added support for two-factor authentication via the [Twilio Verify API](https://www.twilio.com/docs/verify/api).
## How To Run This Application
Microblog is fairly complex application that is developed over the 23 chapters of the tutorial referenced above. Below you can see how to start the basic application using a local SQLite database, and without including support for emails, full-text search and background tasks. This is enough to demonstrate how to add two-factor authentication.
1. Create a Python virtual environment and activate it:
*For Unix and Mac computers:*
```
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ _
```*For Windows computers:*
```
$ python3 -m venv venv
$ venv\Scripts\activate
(venv) $ _
```2. Import the Python dependencies into the virtual environment:
```
(venv) $ pip install -r requirements
```3. Create a local database:
```
(venv) $ flask db upgrade
```4. Define your Twilio credentials
Copy the `.env-template` file to `.env` and then complete the credentials from your Twilio account. You need to include your Twilio account's SID and Auth Token, and the Twilio Verify Service ID.
5. Start the development web server:
```
(venv) $ flask run
```6. Access the application on your web browser at `http://localhost:5000`
Interested in learning more about this application besides two-factor authentication? The [actual tutorial](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world) is the best reference!