Authentication System — Quick Start
Set up authentication for your ValkyrAI/ValorIDE stack in minutes. This guide covers code generation, environment setup, local dev, and endpoint testing.
1. Generate Code
cd /path/to/ValkyrAI
./vaix generate
# Check for BUILD SUCCESS
# TypeScript models generated in web/typescript/backend/api/
2. Configure Environment
Create .env.local in your project root:
cat > .env.local << 'EOF'
GITHUB_CLIENT_ID=your_github_client_id_here
GITHUB_CLIENT_SECRET=your_github_client_secret_here
JWT_SECRET=dev-secret-key-change-in-production
DATABASE_URL=jdbc:postgresql://localhost:5432/valkyr
EMAIL_FROM_ADDRESS=noreply@localhost
EOF
echo ".env.local" >> .gitignore
3. Start the Dev Environment
# Option A: Docker
make harness-up
# Option B: Manual
cd valkyrai && mvn spring-boot:run
curl http://localhost:8081/actuator/health # Expect {"status":"UP"}
4. Test Authentication Endpoints
ADMIN_TOKEN="your_admin_jwt_token"
curl -X POST http://localhost:8081/v1/auth/2fa/initiate \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
| jq '.qrCodeUrl'
Next: See the Authentication System Guide for advanced setup, OAuth, and troubleshooting.