https://github.com/fusionauth/fusionauth-quickstart-python-flask-web
https://github.com/fusionauth/fusionauth-quickstart-python-flask-web
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/fusionauth/fusionauth-quickstart-python-flask-web
- Owner: FusionAuth
- License: other
- Created: 2023-05-05T23:14:48.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-28T05:57:14.000Z (almost 2 years ago)
- Last Synced: 2024-07-28T06:46:17.449Z (almost 2 years ago)
- Language: CSS
- Size: 2.37 MB
- Stars: 5
- Watchers: 10
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Example Flask Application
This repo holds an example Python/Flask application that uses FusionAuth as the identity provider.
This application will use an OAuth Authorization Code Grant workflow to log a user in and get them access and
refresh tokens.
This application was built by following the [Python/Flask Quickstart](https://fusionauth.io/docs/quickstarts/quickstart-python-flask-web).
## Project Contents
The `docker-compose.yml` file and the `kickstart` directory are used to start and configure a local FusionAuth server.
The `/complete-application` directory contains a fully working version of the application.
## Project Dependencies
* Docker, for running FusionAuth
* Python 3.8 or later, for running the Changebank Python application
## Running FusionAuth
To run FusionAuth, just stand up the docker containers using `docker-compose`.
```shell
docker-compose up
```
This will start a PostgreSQL database, and Elastic service, and the FusionAuth server.
## Running the Example App
To run the application, first go into the project directory
```shell
cd complete-application
```
Set up a Python virtual env and installing the project dependencies.
```shell
python -m venv venv && \
source venv/bin/activate && \
pip install -r requirements.txt
```
Then use the `flask run` command to start up the application.
```shell
flask --app server.py run
```
If you're going to be working on the application and want hot reloads of the server code, add the `--debug` flag.
```shell
flask --app server.py --debug run
```
Visit the local webserver at `http://localhost:5000/` and sign in using the credentials:
* username: richard@example.com
* password: password