Revert "feat(makelore): add platform oidc login"

This reverts commit 7236def07d.
This commit is contained in:
brother7 committed 2026-10-11 12:04:01 +08:00
1 parent f2a0eefc9e
commit e28beff3a6
11 files changed
+10 -475

No files matched your search

-22
View File
@@ -27,7 +27,6 @@ import {
getRememberedPasswordState,
updateRememberedPassword,
} from '../../services/remembered-password';
import { startPlatformAuthorization } from '../../services/platform-auth';
type PasswordLoginInput = {
username?: unknown;
@@ -336,22 +335,6 @@ async function handlePasswordLogin(
});
}
async function handlePlatformAuthorizationStart(
req: IncomingMessage,
res: ServerResponse,
): Promise<void> {
// Keep the route body intentionally empty: the Main process owns the OIDC
// client configuration and all PKCE state. The renderer only receives a
// browser URL and never handles a client secret.
readExactJsonObject(await parseJsonBody<Record<string, unknown>>(req), []);
const authorization = await startPlatformAuthorization();
sendJson(res, 200, {
success: true,
requestId: authorization.requestId,
authorizationUrl: authorization.authorizationUrl,
});
}
async function handleRememberedPassword(res: ServerResponse): Promise<void> {
const state = await getRememberedPasswordState();
res.setHeader('Cache-Control', 'no-store');
@@ -808,11 +791,6 @@ export async function handleAuthRoutes(
return true;
}
if (url.pathname === '/api/auth/platform/start' && req.method === 'POST') {
await handlePlatformAuthorizationStart(req, res);
return true;
}
if (url.pathname === '/api/auth/remembered-password' && req.method === 'GET') {
await handleRememberedPassword(res);
return true;