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.
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
}