fix: remove broken OAuth login, scrub hardcoded project ID, prep for public release

This commit is contained in:
Ned
2026-05-27 13:42:21 +00:00
parent 18983b8d36
commit 5cbe8f0b13
4 changed files with 11 additions and 56 deletions
+5 -32
View File
@@ -11,7 +11,6 @@ import {
FileJson,
FileSpreadsheet,
Gauge,
Github,
Home,
Info,
LineChart,
@@ -72,7 +71,7 @@ import {
type ThemeCategory,
} from "./data/themes";
import { themeTokensToStyle } from "./lib/themeTokens";
import { account, appwriteConfig, Channel, client, OAuthProvider, pingAppwrite } from "./lib/appwrite";
import { account, appwriteConfig, Channel, client, pingAppwrite } from "./lib/appwrite";
import {
appwriteErrorMessage,
createEntries,
@@ -366,18 +365,7 @@ function App() {
}
}
function startOAuth(provider: "github" | "google") {
const selectedProvider = provider === "github" ? OAuthProvider.Github : OAuthProvider.Google;
setActionLoading("oauth");
account.createOAuth2Session({
provider: selectedProvider,
success: appwriteConfig.oauthSuccessUrl,
failure: appwriteConfig.oauthFailureUrl,
});
}
async function logout() {
setActionLoading("logout");
setDataError("");
try {
await account.deleteSession({ sessionId: "current" });
@@ -653,12 +641,12 @@ function App() {
return (
<AuthView
authError={authError}
busy={actionLoading === "auth" || actionLoading === "oauth"}
busy={actionLoading === "auth"}
setupStatus={setupStatus}
shellStyle={shellStyle}
themeId={themeId}
onLogin={login}
onOAuth={startOAuth}
onSignup={signup}
/>
);
@@ -926,7 +914,7 @@ function AuthView({
shellStyle,
themeId,
onLogin,
onOAuth,
onSignup,
}: {
authError: string;
@@ -935,7 +923,7 @@ function AuthView({
shellStyle: CSSProperties;
themeId: string;
onLogin: (email: string, password: string) => Promise<void>;
onOAuth: (provider: "github" | "google") => void;
onSignup: (name: string, email: string, password: string) => Promise<void>;
}) {
const [mode, setMode] = useState<AuthMode>("login");
@@ -1014,22 +1002,7 @@ function AuthView({
</button>
</form>
<div className="my-5 grid grid-cols-[1fr_auto_1fr] items-center gap-3 text-xs uppercase tracking-[0.22em] text-slate-600">
<span className="h-px bg-white/10" />
or
<span className="h-px bg-white/10" />
</div>
<div className="grid gap-2">
<button className="secondary-button justify-center" type="button" disabled={busy} onClick={() => onOAuth("github")}>
<Github size={17} aria-hidden="true" />
Continue with GitHub
</button>
<button className="secondary-button justify-center" type="button" disabled={busy} onClick={() => onOAuth("google")}>
<User size={17} aria-hidden="true" />
Continue with Google
</button>
</div>
</div>
</div>
</main>