mirror of
https://github.com/He4eT/fuzzy-bitwarden-clipboard.git
synced 2026-05-04 14:57:22 +00:00
Handle expired session key
This commit is contained in:
parent
b665aeb521
commit
656699f9e6
1 changed files with 11 additions and 1 deletions
12
bwc
12
bwc
|
|
@ -67,7 +67,17 @@ main() {
|
||||||
# Get a list of matching items
|
# Get a list of matching items
|
||||||
|
|
||||||
echo "Searching for '$searchterm'..."
|
echo "Searching for '$searchterm'..."
|
||||||
local logins=$(bw list items --search $searchterm --session $sessionkey)
|
local logins=$(bw list items \
|
||||||
|
--search "$searchterm" \
|
||||||
|
--session "$sessionkey" \
|
||||||
|
--nointeraction
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ -z $logins ]] ; then
|
||||||
|
sudo rm $sessionfile
|
||||||
|
echo "The existing session key is invalid and has been deleted."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Pick one with the fzf
|
# Pick one with the fzf
|
||||||
local id=$(
|
local id=$(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue