# What does this PR do?


## Test Plan
# What does this PR do?


## Test Plan
# What does this PR do?


## Test Plan
This commit is contained in:
Eric Huang 2025-06-25 20:10:45 -07:00
parent 114946ae88
commit a4d84f7805
22 changed files with 821 additions and 38 deletions

View file

@ -0,0 +1,28 @@
import { useState, useEffect } from "react";
export function useAuthConfig() {
const [isAuthConfigured, setIsAuthConfigured] = useState(true);
const [isChecking, setIsChecking] = useState(true);
useEffect(() => {
const checkAuthConfig = async () => {
try {
const response = await fetch("/api/auth/github/login", {
method: "HEAD",
redirect: "manual",
});
setIsAuthConfigured(response.status !== 404);
} catch (error) {
console.error("Auth config check error:", error);
setIsAuthConfigured(true);
} finally {
setIsChecking(false);
}
};
checkAuthConfig();
}, []);
return { isAuthConfigured, isChecking };
}