Files
orangecat/scripts
CatoandClaude Opus 5.5 c8bc3d6e15 feat(oauth): consent screen says which account, how long, and what is risky (#1208)
Compared against X's "Authorize app" screen, ours listed scopes more
precisely but left out five things a person needs before clicking Allow:

- Which account: "Signed in as <name> · @user · email" with "Not you?"
  (signs out and returns to this same request via the sign-in hand-off).
- How long + undo: "until you remove it", linked to Settings → Connected
  apps; OrangeCat's Terms and Privacy linked. Links open in a new tab so
  the request is not abandoned.
- Risky permissions first: OAUTH_SCOPES gains `sensitive` (every write/act
  scope plus wallet.read and messages.read), listed under a warning heading.
- The app's own privacy policy / terms: new oauth_clients.policy_uri /
  tos_uri (additive migration). /oauth/register accepts the RFC 7591
  fields, https only; a bad link is dropped, never a refusal. Loki gets
  both, Heidi privacy only (the pages that exist). Without them the screen
  says the app has published neither.
- Redirect host now shown for verified apps too, not only self-registered.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 08:33:52 -07:00
..
2025-12-10 16:56:40 +01:00

Scripts Directory

This directory contains all automation scripts organized by purpose.

Directory Structure

  • analysis/ - Bundle analysis, documentation checking, and optimization tools
  • auth-fix/ - Scripts to fix authentication and RLS policy issues
  • db/ - Database operations, migrations, and schema management
    • Migration scripts moved from root: apply-migration.js, apply-*-migration.js
    • Old schema files archived in db/archive/
  • deployment/ - Deployment, production setup, and monitoring scripts
  • dev/ - Development helpers, local setup, and debugging tools
  • diagnostics/ - Health checks and system diagnostics
  • maintenance/ - Cleanup, optimization, and maintenance scripts
  • monitoring/ - Performance monitoring and bundle size tracking
  • oauth/ - OAuth provider setup and configuration
  • profile-fix/ - Scripts to fix profile-related issues
  • schema-fix/ - Database schema fixes and migrations
  • storage/ - Supabase storage bucket setup and management
  • test/ - Testing utilities and validation scripts
    • Test/debug scripts moved from root: test-*.js, check-*.js, debug-*.js

Usage

Most scripts can be run with:

node scripts/{category}/script-name.js

For deployment scripts:

bash scripts/deployment/script-name.sh

Important Scripts

  • scripts/dev/dev-start.js - Main development server starter
  • scripts/deployment/browser-verify.js - Post-deploy browser smoke test (deploys themselves happen on the box — see docs/deployment/DEPLOYMENT_PROCESS.md)
  • scripts/db/apply-migrations.ts - Database migrations
  • scripts/maintenance/cleanup-console-logs.ts - Remove console.log statements