This application builds on the FusionAuth Flask Quickstart.
It has additional pages:
- A page showing the Changebank video. A user who views this page will have an anonymous, shadow user account created for them in FusionAuth. This account will record the number of times this page is visited. This anonymous account will not be visible to the user.
- An account conversion page, where a user can create an account by providing an email address. If they have an anonymous account, the data in that account will be carried over to the full account.
- A webhook receiver, which will, upon email verification, update the user's
data
field to reflect account conversion.
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.
- Docker, for running FusionAuth
- Python 3.8 or later, for running the Changebank Python application
To run FusionAuth, just stand up the docker containers using docker compose
.
docker compose up
This will start a PostgreSQL database, and Elastic service, and the FusionAuth server.
To run the application, first go into the project directory
cd complete-application
Set up a Python virtual env and installing the project dependencies.
python -m venv venv && \
source venv/bin/activate && \
pip install -r requirements.txt
Then use the flask run
command to start up the application.
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.
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