Biometric unlock for Bitwarden CLI

Feature name

  • Biometric unlock for Bitwarden CLI

Feature function

  • Add biometric unlock feature to the command line interface in the same way that we have it for the web browser extensions for MacOS, where the browser extensions contact the desktop app for the biometric authentication.
  • This will provider quicker unlock of the command line interface.
12 Likes

I would love to see this properly implemented, meanwhile this is my workaround for macOS:

3 Likes

I use a similar workaround, although I store the BW_SESSION in the macOS keychain instead (which doesn’t use TouchID, unfortunately). This is the bash function I use:

function bwu() {
    BW_SESSION=$(security find-generic-password -a ${USER} -s BW_SESSION -w)
    export BW_SESSION
    BW_STATUS=$(bw status | jq -r .status)
    case "$BW_STATUS" in
    "unauthenticated")
        echo "Logging into BitWarden"
        unset BW_SESSION
        export BW_SESSION=$(bw login --raw)
        security add-generic-password -U -a ${USER} -s BW_SESSION -w "${BW_SESSION}"
        ;;
    "locked")
        echo "Unlocking Vault"
        unset BW_SESSION
        export BW_SESSION=$(bw unlock --raw)
        security add-generic-password -U -a ${USER} -s BW_SESSION -w "${BW_SESSION}"
        ;;
    "unlocked")
        echo "Vault is unlocked"
        ;;
    *)
        echo "Unknown Login Status: $BW_STATUS"
        return 1
        ;;
    esac
    bw sync
}
1 Like