Add Passkey (WebAuthn) authentication support
Introduces Passkey (WebAuthn) registration and authentication to both backend and frontend. Backend adds new API endpoints, middleware exceptions, and a PasskeyHelper for credential management using @simplewebauthn/server. Frontend integrates @simplewebauthn/browser, updates login and config pages for Passkey registration and login flows, and adds related UI and controller methods.
This commit is contained in:
1 parent
173a165c4b
commit
afb6ef421a
9 files changed
+611
-4
No files matched your search
@@ -12,6 +12,12 @@ export async function auth (req: Request, res: Response, next: NextFunction) {
|
||||
if (req.url === '/auth/login') {
|
||||
return next();
|
||||
}
|
||||
if (req.url === '/auth/passkey/generate-authentication-options' ||
|
||||
req.url === '/auth/passkey/verify-authentication') {
|
||||
return next();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 判断是否有Authorization头
|
||||
if (req.headers?.authorization) {
|
||||
|
||||
Reference in new issue
Block a user