Drop all passkeys if the dashboard domain changes

This commit is contained in:
Johannes Zellner
2026-02-16 12:06:09 +01:00
parent dfbe5aaa16
commit ef24b17a70
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -91,6 +91,10 @@ async function updateCounter(id, counter) {
await database.query('UPDATE passkeys SET counter = ?, lastUsedTime = NOW() WHERE id = ?', [ counter, id ]);
}
async function delAll() {
await database.query('DELETE FROM passkeys');
}
function storeChallenge(userId, challenge) {
const key = `${userId}`;
gChallenges.set(key, {
@@ -308,6 +312,9 @@ export default {
del,
updateCounter,
// this is only for dashboard origin changes
delAll,
generateRegistrationOptions,
verifyRegistration,
generateAuthenticationOptions,