Skip to content

FusionAuth/fusionauth-example-anonymous-user

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Example Anonymous User Application

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.

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.

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

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:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published