Files
indee-demo/DEV_AUTH.md
Dorian 8d56fe392d refactor: update environment configuration and documentation
- Modified `.env.example` to reflect new API URL structure and added CDN configuration for external storage.
- Updated `.gitignore` to include deployment secrets and certificate files, ensuring sensitive information is not committed.
- Revised `BACKEND_INTEGRATION.md` to clarify authentication methods, replacing Cognito references with Nostr NIP-98.
- Deleted outdated documentation files (`CONTENT-INTEGRATION-COMPLETE.md`, `CURSOR-MCP-SETUP.md`, `FINAL-STATUS.md`, `FIXES-APPLIED.md`, `INDEEHHUB-INTEGRATION.md`, `PROJECT-COMPLETE.md`, `PROJECT-SUMMARY.md`) to streamline project documentation.

These changes enhance the clarity of the environment setup and improve the overall documentation structure for better developer onboarding.
2026-02-17 05:12:59 +00:00

1.2 KiB

Development Mode Authentication

When running npm run dev without a backend, the app uses mock authentication so you can test the full UI flow.

What Works (Without Backend)

Nostr Login (Mock)

  • Click "Remote Signer" or "Extension" or "Private Key"
  • Extension: requires a Nostr browser extension (Alby, nos2x)
  • Remote Signer: shows QR/link; mock flow completes without real signer
  • Private Key: paste nsec; creates mock session
  • Sovereign Identity: generates keypair and mocks login

Email/Password (Legacy Form)

  • The auth form triggers the "Sovereign Identity" flow by default
  • After dismissing, any email/password creates a mock user
  • Stored in sessionStorage

With Real Backend

  1. Start backend: cd backend && npm run start:dev (or use bash scripts/dev.sh)
  2. Set VITE_USE_MOCK_DATA=false and VITE_INDEEHUB_API_URL=/api in .env
  3. Restart frontend: npm run dev

Real auth uses Nostr (NIP-98) and issues JWTs from the backend. No Cognito.

Session Storage

Mock sessions use sessionStorage:

  • nostr_token — Nostr session JWT (mock or real)
  • indeehub_api_refresh — refresh token for API

Refresh keeps you logged in until the tab is closed.