* feat: replace manual oauth with better-auth * fix: lint * chore: refactor accounts to unify github + vercel * feat: enhance auth config with host allowlisting Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com> * fix: add newline at end of manifest.json Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com> * fix: update betterAuth database schema mappings Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com> * fix: sanitize redirects and preserve destination in github flow Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com> * feat: enhance GitHub app callback with installation sync tracking Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com> * build: add BETTER_AUTH_SECRET to turbo env Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com> * refactor: update sign-in callback to skip onboarding Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com> --------- Co-authored-by: nicoalbanese <49612682+nicoalbanese@users.noreply.github.com> Co-authored-by: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com>
22 lines
590 B
TypeScript
22 lines
590 B
TypeScript
export type GitHubConnectionStatus =
|
|
| "not_connected"
|
|
| "connected"
|
|
| "reconnect_required";
|
|
|
|
export type GitHubConnectionReason =
|
|
| "token_unavailable"
|
|
| "installations_missing"
|
|
| "sync_auth_failed";
|
|
|
|
export interface GitHubConnectionStatusResponse {
|
|
status: GitHubConnectionStatus;
|
|
reason: GitHubConnectionReason | null;
|
|
hasInstallations: boolean;
|
|
syncedInstallationsCount: number | null;
|
|
}
|
|
|
|
export function buildGitHubReconnectUrl(next: string): string {
|
|
const params = new URLSearchParams({ step: "github", next });
|
|
return `/get-started?${params.toString()}`;
|
|
}
|