mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user