Files
lk/data/pass_otp.md
2025-12-04 17:48:15 +01:00

49 lines
1.7 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "pass with otp"
tags: [ "data", "credentials", "secrets", "2fa", "otp" ]
requires: "pass"
---
Need a Microsoft or Google authenticator?
No you don't.
These usually come in the form of QR codes.
```qr code
                                 
    █▀▀▀▀▀█ ▀ ▀▀▀ ▀ ▄ █▀▀▀▀▀█    
    █ ███ █ ▄▄▀▄▄▀▄▄▀ █ ███ █    
    █ ▀▀▀ █ ██ ▀▄██▀▀ █ ▀▀▀ █    
    ▀▀▀▀▀▀▀ █ █▄▀ █ █ ▀▀▀▀▀▀▀    
    █▄▄ █▄▀▀██ ▄▄▀▀▄██▀▀██ ▄▀    
    ▄██▄▀█▀█ ▀▄▀ █▀▀▀█ ▀▀▀█▄     
    ▄ ▄▄█ ▀▀ ▄▄▀▀█▄█ ▀▀ ▄▀▀█▀    
      █ ▀ ▀▀█▀▀ ▄ ▄█▀▄▀██▀█▄     
    ▀▀▀ ▀ ▀ █▄▄▀▄▀▀▄█▀▀▀█▀▀      
    █▀▀▀▀▀█ ▀▄ █▀█▀ █ ▀ █▄▄      
    █ ███ █ ▀ ▄ ▀█▄ ████▀▀█▄█    
    █ ▀▀▀ █  ▄▀ ▄ ▄▄ ██▄▄█▄█     
    ▀▀▀▀▀▀▀ ▀ ▀▀ ▀▀▀ ▀▀   ▀▀▀    
                                 
                                 
```
Download the code, and get the information out:
```sh
zbarimg qr.png
otp="$(zbarimg qr.png | sed 's/QR-Code://')"
otp_name=site.org.otp
echo "${otp}" | pass otp add --echo "${otp_name}"
```
Show the OTP:
```sh
pass otp "${otp_name}"
```