Refactor: Remove passkey-related functionality and types

- Deleted passkey-related interfaces and types from index.ts and types.ts.
- Removed passkey handling from App component, including related state and functions.
- Cleaned up API calls in auth.ts, removing passkey registration and login functions.
- Updated vault and import formats to eliminate passkey references.
- Removed passkey support checks and UI elements from AuthViews and SettingsPage.
- Cleaned up unused passkey helper functions and constants.
- Adjusted related components and hooks to ensure consistent functionality without passkey support.
This commit is contained in:
shuaiplus
2026-04-06 00:46:13 +08:00
parent 90a7731351
commit 76623d7201
28 changed files with 28 additions and 1064 deletions
-25
View File
@@ -62,13 +62,6 @@ import {
} from './handlers/attachments';
import { handleAuthenticatedDeviceRoute } from './router-devices';
import { handleAdminRoute } from './router-admin';
import {
handleBeginPasskeyRegistration,
handleDeletePasskey,
handleFinishPasskeyRegistration,
handleListPasskeys,
handleRenamePasskey,
} from './handlers/passkeys';
export async function handleAuthenticatedRoute(
request: Request,
@@ -114,24 +107,6 @@ export async function handleAuthenticatedRoute(
return handleGetTotpRecoveryCode(request, env, userId);
}
if (path === '/api/accounts/passkeys' && method === 'GET') {
return handleListPasskeys(request, env, userId);
}
if (path === '/api/accounts/passkeys/begin-registration' && method === 'POST') {
return handleBeginPasskeyRegistration(request, env, userId);
}
if (path === '/api/accounts/passkeys/finish-registration' && method === 'POST') {
return handleFinishPasskeyRegistration(request, env, userId);
}
const passkeyMatch = path.match(/^\/api\/accounts\/passkeys\/([a-f0-9-]+)$/i);
if (passkeyMatch) {
if (method === 'PATCH' || method === 'PUT') return handleRenamePasskey(request, env, userId, passkeyMatch[1]);
if (method === 'DELETE') return handleDeletePasskey(request, env, userId, passkeyMatch[1]);
}
if (path === '/api/accounts/revision-date' && method === 'GET') {
return handleGetRevisionDate(request, env, userId);
}