Skip to content

FusionAuth/fusionauth-example-family

master
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
 
 
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 

FusionAuth Family API example

This project is an example Node.js application that illustrates how to leverage the FusionAuth family API. This application will use an OAuth Authorization Code workflow and the PKCE extension to log users in. PKCE stands for Proof Key for Code Exchange, and is often pronounced “pixie”.

To run

This assumes you already have a running FusionAuth instance, user and application running locally. If you don't, please see the 5-Minute Setup Guide to do so.

  • update your FusionAuth application to allow a redirect of http://localhost:3000/oauth-redirect
  • Create a parent user and a child user that is associated with the parent email. See the family guide for more information.
  • Create a consent in the FusionAuth admin screen. "Settings" -> "Consents".
  • npm install
  • update routes/index.js with your API key
  • update routes/index.js, views/index.pug and confirmchildren.pug with the client id of your FusionAuth application.
  • update routes/index.js with your client secret and consent id.
  • npm start

Go to http://localhost:3000/ and login with the previously created parent user. You should now see a list of any children you must approve. Approve them and you can see them on the home page. You'll then be able to grant or revoke the consent for that child.

TODO

Handle registration as well as login of the parent.

About

Example of family workflow

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published