Compare commits
2 commits
b3a9d1010b
...
194435e52c
Author | SHA1 | Date | |
---|---|---|---|
194435e52c | |||
38aa163634 |
1 changed files with 5 additions and 1 deletions
6
otpish
6
otpish
|
@ -72,7 +72,11 @@ if [ "${COMMAND}" = "get" ]; then
|
|||
if [ "$(echo ${i} | cut -d'=' -f1)" = "digits" ]; then digits=$(echo ${i} | cut -d'=' -f2); fi
|
||||
if [ "$(echo ${i} | cut -d'=' -f1)" = "period" ]; then period=$(echo ${i} | cut -d'=' -f2); fi
|
||||
done
|
||||
oathtool --totp -b -s "${period}s" -d ${digits} ${secret}
|
||||
if [ -z ${secret} ]; then
|
||||
echo secret value unset, check otpish dump to make sure you added the uri correctly
|
||||
exit
|
||||
fi
|
||||
oathtool --totp -b -s "${period:-30}s" -d ${digits:-6} ${secret}
|
||||
exit
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue