WIP 🔐 feat: PassKey (#5606)

* added PassKey authentication.

* fixed issue with test :)

* Delete client/src/components/Auth/AuthLayout.tsx

* fix: conflicted issue
This commit is contained in:
Ruben Talstra 2025-02-12 20:40:29 +01:00 committed by GitHub
parent 2a506df443
commit 1cb1c9196d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 569 additions and 12 deletions

View file

@ -39,6 +39,13 @@ const Session = mongoose.Schema({
},
});
const passkeySchema = mongoose.Schema({
id: { type: String, required: true },
publicKey: { type: Buffer, required: true },
counter: { type: Number, default: 0 },
transports: { type: [String], default: [] },
});
/** @type {MongooseSchema<MongoUser>} */
const userSchema = mongoose.Schema(
{
@ -117,6 +124,10 @@ const userSchema = mongoose.Schema(
unique: true,
sparse: true,
},
passkeys: {
type: [passkeySchema],
default: [],
},
plugins: {
type: Array,
default: [],