mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
feat: add passkey-first login and management flow
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
} from './handlers/sends';
|
||||
import { handleKnownDevice } from './handlers/devices';
|
||||
import { handleToken, handlePrelogin, handleRevocation } from './handlers/identity';
|
||||
import { handleBeginPasskeyLogin, handleFinishPasskeyLogin } from './handlers/passkeys';
|
||||
import {
|
||||
handleRegister,
|
||||
handleGetPasswordHint,
|
||||
@@ -274,6 +275,14 @@ export async function handlePublicRoute(
|
||||
return handleToken(request, env);
|
||||
}
|
||||
|
||||
if (path === '/identity/passkeys/begin-login' && method === 'POST') {
|
||||
return handleBeginPasskeyLogin(request, env);
|
||||
}
|
||||
|
||||
if (path === '/identity/passkeys/finish-login' && method === 'POST') {
|
||||
return handleFinishPasskeyLogin(request, env);
|
||||
}
|
||||
|
||||
if (path === '/api/devices/knowndevice' && method === 'GET') {
|
||||
const blocked = await enforcePublicRateLimit();
|
||||
if (blocked) return jsonResponse(false);
|
||||
|
||||
Reference in New Issue
Block a user