https://github.com/emmanuelaaron/basicflaskauth
https://github.com/emmanuelaaron/basicflaskauth
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/emmanuelaaron/basicflaskauth
- Owner: Emmanuelaaron
- Created: 2019-11-25T09:46:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-06T19:46:40.000Z (about 5 years ago)
- Last Synced: 2025-01-21T13:06:55.936Z (over 1 year ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Basic Flask Auth - Follow Along
## Getting Started
### Installing Dependencies
#### Python 3.7
Follow instructions to install the latest version of python for your platform in the [python docs](https://docs.python.org/3/using/unix.html#getting-and-installing-the-latest-version-of-python)
#### Virtual Enviornment
We recommend working within a virtual environment whenever using Python for projects. This keeps your dependencies for each project separate and organaized. Instructions for setting up a virual enviornment for your platform can be found in the [python docs](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/)
#### PIP Dependencies
Once you have your virtual environment setup and running, install dependencies by running:
```bash
pip install -r requirements.txt
```
This will install all of the required packages we selected within the `requirements.txt` file.
##### Key Dependencies
- [Flask](http://flask.pocoo.org/) is a lightweight backend microservices framework. Flask is required to handle requests and responses.
- [jose](https://python-jose.readthedocs.io/en/latest/) JavaScript Object Signing and Encryption for JWTs. Useful for encoding, decoding, and verifying JWTS.
## Running the server
From within this directory first ensure you are working using your created virtual environment.
Each time you open a new terminal session, run:
```bash
export FLASK_APP=app.py;
```
To run the server, execute:
```bash
flask run --reload
```
The `--reload` flag will detect file changes and restart the server automatically.
## Tasks
### Setup Auth0
1. Create a new Auth0 Account
2. Select a unique tenant domain
3. Create a new, single page web application
4. Create a new API