javascripttypescriptpasskeypassword-manager

Passkey with typescript library simplewebauthn & password manager


I have implemented Passkey in ts with the library https://simplewebauthn.dev/docs/

It saved passkey in my browser Keychain or mac keychain.

But I also want that my password manager (dashlane, 1password,...) save it like for this site https://example.hanko.io/

How can I setup GenerateRegistrationOptions in order to be compatible with Password manager?

I try many combo like the following code. Is it elsewhere in the code?

// see for options https://simplewebauthn.dev/docs/packages/server
      authenticatorSelection: {
        residentKey: "preferred",
        /**
         * Wondering why user verification isn't required? See here:
         *
         * https://passkeys.dev/docs/use-cases/bootstrapping/#a-note-about-user-verification
         */
        userVerification: "preferred",
      }

Solution

  • There is nothing that needs to be done on the relying party side.

    If a passkey provider (e.g. password manager) is installed at the OS level and enabled as a provider, they will be listed in the platform passkeys dialog as a place to save a passkey.

    If a passkey provider is installed as a browser extension, the passkey provider will provide their browser-based (or in some cases native app-based) UI when WebAuthn is invoked.

    General Note: if you're trying to create passkeys, residentKey should always be "required" (passkeys are resident keys).