/simple-totp

Simple TOTP Extenstion to Pass

Primary LanguageShellGNU General Public License v3.0GPL-3.0

simple-totp

Simple TOTP Extenstion to Pass Project.

This plugin use openssl to decode the sha1 TOTP secret key, based in local timestamp. NOTE: Is super important your system datetime is syncked to NTP servers.

Requirements:

  • pass
  • openssl
  • NTP configured

Instalation

$ wget -qO ./otp.bash https://github.com/betabrandao/simple-totp/raw/refs/heads/main/otp.bash | sudo install ./otp.bash /usr/lib/password-store/extensions/otp.bash

Usage:

Step 1:

  • Add to your secret a secret: key.

Example:

$ pass edit mypass/example

anpasswordexempleusingpass
---
user: aUserExample
pass: anpasswordexempleusingpass
url: https://anpasswordexempleusingpass.example.com
secret: YOURTOTPBASE32SECRET

Save this.

Step 2: Get opt code.

  • To copy token to clipboard , use -c option. example: pass otp path/of/password -c ;
  • To generate qrcode to OTP Applications, use -qr option;
$ pass otp mypass/example

Done! Simple TOTP!