fabro/apps/fabro-web/app/lib/github.server.ts
Bryan Helmkamp 3a6ec9b9ef Rename Arc to Fabro in TypeScript/JavaScript
Rename directories (arc-web → fabro-web, arc-api-client → fabro-api-client),
update package names, import paths, TS-only identifiers (theme key, session
cookie, demo cookie, OAuth state, db filename, mock data), and supporting
files (Dockerfile, docker-compose, entrypoint, CI workflow, CLAUDE.md).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 11:13:18 -04:00

18 lines
518 B
TypeScript

import { GitHub, generateState } from "arctic";
import { getAppConfig } from "./config.server";
export { generateState };
export function getGitHubOAuth() {
const clientId = getAppConfig().git.client_id;
const clientSecret = process.env.GITHUB_APP_CLIENT_SECRET;
if (!clientId || !clientSecret) {
throw new Error("GitHub App is not configured");
}
return new GitHub(clientId, clientSecret, null);
}
export function isGitHubAppConfigured(): boolean {
return getAppConfig().git.client_id !== null;
}