<?php
/**
 * GET /api/auth/oauth_google_callback.php
 * STUB - see oauth_google.php for the full TODO list. This is where Google
 * redirects back with ?code=... after the user approves the consent screen.
 *
 * TODO: exchange $_GET['code'] for tokens, verify the id_token, then:
 *   - look up users WHERE oauth_provider='google' AND oauth_id=<sub>
 *   - if not found, create one (email from Google profile, no password_hash
 *     needed - the column is nullable specifically for this), account_type
 *     defaults to 'personal' (ask the user to pick personal/business on
 *     first login if you want that choice preserved)
 *   - call login_user() and redirect to /marketplace.html
 */

require_once __DIR__ . '/../config/config.php';

header('Location: ' . APP_URL . '/login.html?oauth_error=google_not_implemented');
exit;
