Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier to enter TOTP secrets. #169

Open
kevincox opened this issue Oct 8, 2022 · 3 comments
Open

Make it easier to enter TOTP secrets. #169

kevincox opened this issue Oct 8, 2022 · 3 comments

Comments

@kevincox
Copy link

kevincox commented Oct 8, 2022

Currently pass-otp requires using an otpauth:// URI which is fantastic for flexibility however in practice this isn't the OTP format that is generally shared by websites. This makes entering secrets unnecessarily difficult. As entering new OTP secrets is something I do rarely I can never remember the full format of the URI. otpauth://totp/totp-secret?secret= is by far the most common format required and it is a lot to remember. otpauth:// is shown in the prompt so that is "free" but totp/totp-secret?secret is not much off from line-noise. I can remember that totp should be in there somewhere but the exact format is too much for my brain. I end up dumping another secret that I know I already have, constructing the URL (and copying it as I need to insert it twice) then inserting it.

I think it would be a great benefit to users if the tool could provide some assistance. Here is a first idea:

  1. If entering a secret interactively.
  2. After the secret is entered twice identically.
  3. If the secret is not a valid otpauth:// URI.
  4. If the secret is a valid TOTP token.
  5. Prompt the user if this is a TOTP token.
  6. If they indicate that it is, generate the full URL (otpauth://totp/totp-secret?secret=$user_input) and insert that.

I think the risk here is very low because most sites will require the user to insert a test code before enabling 2fa anyways and the UX improvement is dramatic.

@hungLink
Copy link

Given that the pass otp insert command right now seems to just mirror the functionality of pass insert, I think it would make sense to just change it to automatically prepend the string.

People who don't want it automatically prepended can just use pass insert

@ghost
Copy link

ghost commented Apr 21, 2023

I highly recommend to add this!
I have never saw a website that displays me the otpauth:// URI ...
It always only the secret token.

@betabrandao
Copy link

I'm create my self extension because this extension is not easy. See here: https://github.com/betabrandao/simple-totp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants