Claim Data after Guardian Consent

How to implement the Consentful "Claim Later" Flow

Overview

The Consentful "Claim Later" Flow enables applications to save an ephemeral user's session data as a "Save Game" state, which can be restored after obtaining guardian consent. This pattern is ideal for applications that need to:

  • Create low-PII profiles quickly (using nicknames)

  • Allow users to start using the application immediately

  • Obtain guardian consent after initial engagement

  • Restore the user's session state after consent is granted

Use Case: MyLittleTabbyCat

To illustrate this flow, we'll use a fictional application called "MyLittleTabbyCat" where a child creates a personalized tabby cat and receives daily inspirational quotes. The child initially creates their cat in an ephemeral session, then takes a QR code home for their guardian to scan and provide consent.

Implementation Steps

1. Create a "Save Game" Boost

After the user creates their content in your application, store this data as a Boost on the LearnCard network:

This example shows how to extend a regular "BoostCredential" with a "TabbyCat" schema in JSON-LD. Check it out on the JSON-LD playground here. You can verify it's a valid credential by "issuing it" in the CLI:

2. Create a Guardian ConsentFlow

After creating the boost, set up a ConsentFlow that requires guardian consent:

3. Generate QR Code for User

Display a QR code linking to the ConsentFlow for the user:

After the guardian provides consent, LearnCard redirects to your application's callback URL with the user's DID:

5. Retrieve "Save Game" Data

After receiving the user's DID, retrieve their boost data to restore their session:

6. Return User Flow (Login by Cat Name)

For returning users who know their cat's name:

Complete Flow Diagram

  1. User creates content in your application (ephemeral session)

  2. Application creates a Boost with the user's data

  3. Application creates a ConsentFlow with guardian consent requirement, linking the Boost

  4. User receives a QR code to take home

  5. Guardian scans QR code and provides consent

  6. User is redirected back to your application with their LearnCard DID

  7. Application retrieves "Save Game" data using the DID

  8. Application restores the user's session

Best Practices

  1. Add Searchable Metadata: Always include unique identifiers in the boost metadata for easy lookup.

  2. Clear Consent Reasons: Provide clear explanations for guardians about what data is being stored.

  3. Graceful Fallbacks: Handle cases where consent is denied or the process is interrupted.

  4. Secure User Associations: Verify that the returning user is associated with the correct boost.

  5. Data Minimization: Store only necessary information in the boost credential.

For more information on GameFlow (the framework this flow is built on), see the GameFlow documentation.

Last updated

Was this helpful?