GenoBank.io

Passkey DNA Kit Activation Implementation

Overview

This implementation adds passkey-based authentication (Face ID, Touch ID, Windows Hello) to the DNA kit activation flow using Privy and existing GenoBank infrastructure.

Files Created

Frontend

  1. passkey-activation.html - Main activation page with 4-step flow
  2. passkey-activate.js - JavaScript handling Privy integration and API calls

Backend

  1. /production_api/plugins/activation/api_activate_kit.py - API endpoint that leverages existing biosample infrastructure

How It Works

Magic URL Support

The implementation seamlessly supports DNA kits shipped with magic URLs:

1. Authentication (Step 1)

2. Barcode Scanning (Step 2)

3. Confirmation (Step 3)

4. Activation (Step 4)

Existing Infrastructure Used

  1. Authentication
    • /recover endpoint for signature verification
    • Standard Web3 signature pattern
  2. Biosample Management
    • BiosampleDAO for database operations
    • BiosampleService for business logic
    • Existing biosample MongoDB schema
  3. Story Protocol Integration
    • StoryIpManagerDAO for NFT minting
    • Existing collection addresses
    • IPFS metadata upload
  4. Kit Manufacturer Detection
    • Logic from newborn plugin for prefix detection
    • Support for DNA Genotek, Spectrum DNA, etc.

Setup Required

  1. Privy Configuration
    • ✅ Privy App ID configured: cmc5jn5sh01wel10ng0x5atlt
    • App configured for passkey, email, Google, and Apple login methods
    • Ready for production use
  2. API Integration
    • Add the activation plugin to your CherryPy app
    • Ensure Story Protocol is configured
    • Verify biosample collection address
  3. Frontend Deployment
    • Deploy files to /activate/ directory
    • Update navigation to include activation link
    • Test passkey support on target devices

Security Considerations

  1. All operations are scoped by wallet address
  2. Signatures verified on every API call
  3. Duplicate activation prevented
  4. IPFS metadata includes activation details

Next Steps

  1. Add email notifications on successful activation
  2. Implement QR code scanning option
  3. Add support for bulk kit activation
  4. Create admin interface for managing activations
  5. Add analytics tracking for activation success rates