Skip to content

Instantly share code, notes, and snippets.

@cyyynthia
Created October 12, 2025 17:53
Show Gist options
  • Select an option

  • Save cyyynthia/8b2da62b8a35d1a4f3cd0d28a2861d08 to your computer and use it in GitHub Desktop.

Select an option

Save cyyynthia/8b2da62b8a35d1a4f3cd0d28a2861d08 to your computer and use it in GitHub Desktop.
Force Discord (and other websites with the same issue) to use Resident Credentials (aka Passkeys) instead of U2F credentials
const createCreds = navigator.credentials.create;
navigator.credentials.create = (creds) => {
creds.publicKey.authenticatorSelection.residentKey = 'preferred';
return createCreds.call(navigator.credentials, creds);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment