import { getChatGPTUser, chatGPTSignInPath, chatGPTSignOutPath } from "../../chatgpt-auth";

export const dynamic = "force-dynamic";

export async function GET() {
  const user = await getChatGPTUser();
  return Response.json({
    authenticated: Boolean(user),
    user,
    signInUrl: chatGPTSignInPath("/"),
    signOutUrl: chatGPTSignOutPath("/"),
  });
}
