Skip to content

Instantly share code, notes, and snippets.

View mateusz834's full-sized avatar

Mateusz Poliwczak mateusz834

  • Here at ::1
  • 12:33 (UTC +02:00)
View GitHub Profile
@mateusz834
mateusz834 / register-as-security-key.md
Last active March 9, 2025 16:06
register a security key on google, not as a passkey.

Paste this to console:

const originalCreate = window.navigator.credentials.create;
window.navigator.credentials.create = async function (options) {
    if (options && options.publicKey && options.publicKey.authenticatorSelection) {
        options.publicKey.authenticatorSelection.residentKey = 'discouraged';
    }
    return originalCreate.call(window.navigator.credentials, options);
};