SSO registration & setup guide

- Google, Apple, GitHub SSO login via popup OAuth flow
- New /mobile/auth page with 3-click registration
  (Click provider → authorize → auto-logged in)
- Email registration with name + email + password
- /mobile/setup page with step-by-step OAuth setup guide
- OAuth env vars in .env.example, docker-compose.yml
- scripts/setup-sso.sh for one-command credential setup
- Graceful 503 when OAuth not configured
This commit is contained in:
root
2026-06-15 13:38:24 +02:00
parent d194e295ad
commit efe8fe36d4
3 changed files with 689 additions and 2 deletions
+8 -2
View File
@@ -4,16 +4,22 @@ services:
build: .
image: falah-mobile:latest
ports:
- "4011:3000"
- "4013:3000"
environment:
- NODE_ENV=production
- JWT_SECRET=${JWT_SECRET:-flh-dev-jwt-secret-change-in-prod}
- DATABASE_URL=file:./dev.db
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID:-}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET:-}
- APPLE_CLIENT_ID=${APPLE_CLIENT_ID:-}
- APPLE_CLIENT_SECRET=${APPLE_CLIENT_SECRET:-}
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID:-}
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET:-}
volumes:
- falah-mobile-data:/app/data
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
test: ["CMD", "curl", "-f", "http://localhost:3000/mobile/api/health"]
interval: 30s
timeout: 10s
retries: 3