/** * GET /api/auth/me — current Steam session (or { authenticated: false }). */ import { jsonResponse, sessionFromRequest } from "./_steam_common.js"; export async function onRequestGet(context) { try { const session = await sessionFromRequest(context); if (!session) { return jsonResponse({ authenticated: false }); } return jsonResponse({ authenticated: true, steamid: session.steamid, account_id: session.account_id, personaname: session.personaname || null, avatar: session.avatar || null, }); } catch { return jsonResponse({ authenticated: false }); } }