mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-05 08:10:39 +00:00
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>
18 lines
518 B
TypeScript
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;
|
|
}
|
|
|