# Quick OAuth Setup Checklist

## For Google OAuth

```
1. Go to: https://console.cloud.google.com/
2. Create new project: "Estate Platform"
3. Enable Google+ API
4. Create OAuth 2.0 Web Application credentials
5. Set redirect URI: http://localhost:3001/auth/google/callback
6. Copy Client ID and Secret
7. Edit: data/system-config.json
   "google": {
     "enabled": true,
     "clientId": "YOUR_CLIENT_ID",
     "clientSecret": "YOUR_CLIENT_SECRET"
   }
8. Restart server: npm run dev
```

## For GitHub OAuth

```
1. Go to: https://github.com/settings/developers
2. Create New OAuth App
3. Set callback: http://localhost:3001/auth/github/callback
4. Copy Client ID and generate Client Secret
5. Edit: data/system-config.json
   "github": {
     "enabled": true,
     "clientId": "YOUR_CLIENT_ID",
     "clientSecret": "YOUR_CLIENT_SECRET"
   }
6. Restart server: npm run dev
```

## For Facebook OAuth

```
1. Go to: https://developers.facebook.com/
2. Create new app (Consumer type)
3. Add Facebook Login product
4. Set redirect: http://localhost:3001/auth/facebook/callback
5. Get App ID and App Secret
6. Edit: data/system-config.json
   "facebook": {
     "enabled": true,
     "clientId": "YOUR_APP_ID",
     "clientSecret": "YOUR_APP_SECRET"
   }
7. Restart server: npm run dev
```

## For Discord OAuth

```
1. Go to: https://discord.com/developers/applications
2. Create New Application
3. Go to OAuth2 section
4. Add redirect: http://localhost:3001/auth/discord/callback
5. Copy Client ID and generate Client Secret
6. Edit: data/system-config.json
   "discord": {
     "enabled": true,
     "clientId": "YOUR_CLIENT_ID",
     "clientSecret": "YOUR_CLIENT_SECRET"
   }
7. Restart server: npm run dev
```

## Testing

1. Open http://localhost:3001
2. Click "Get Started" or login button
3. You should see OAuth provider buttons:
   - 🔍 Google
   - 🐙 GitHub
   - 👍 Facebook
   - 💬 Discord
4. Click any button to test the OAuth flow

## Disable a Provider

Set `"enabled": false` for any provider in `data/system-config.json`:

```json
"google": {
  "enabled": false,
  "clientId": "...",
  "clientSecret": "..."
}
```

The button will no longer appear in the login modal.

## Environment Variables (Production)

Instead of editing system-config.json, you can use environment variables:

```bash
GOOGLE_CLIENT_ID=xxx
GOOGLE_CLIENT_SECRET=xxx
GITHUB_CLIENT_ID=xxx
GITHUB_CLIENT_SECRET=xxx
FACEBOOK_CLIENT_ID=xxx
FACEBOOK_CLIENT_SECRET=xxx
DISCORD_CLIENT_ID=xxx
DISCORD_CLIENT_SECRET=xxx
```

## Production URLs

Replace `http://localhost:3001` with your actual domain:
- Production: `https://yourdomain.com/auth/[provider]/callback`
- Staging: `https://staging.yourdomain.com/auth/[provider]/callback`

Update these in BOTH:
1. Provider dashboard settings
2. system-config.json or environment variables
