Giter VIP home page Giter VIP logo

Comments (10)

bndw avatar bndw commented on May 10, 2024

I'd like to flush out the usage for this one before implementing it; here's my first thought:

pick edit <name> <username|password>

Examples

# Edit a username

pick edit github username
Enter a new username for github
>
# Edit a password (generate a new one)

pick edit github password
Generate a new password for github (Y/n)?
>
# Edit a password (manual)

pick edit github password
Generate a new password for github (Y/n)?
> n
Enter a password for github
>

Thoughts?

from pick.

bndw avatar bndw commented on May 10, 2024

I think if we want to rename an account, e.g. github -> github/bndw, we should consider adding a mv command.

I'd prefer to stick to using built-in command names whenever possible. This keeps usage intuitive and familiar.

EDIT:
I wonder if we could achieve all of this with a mv command?

# Rename a credential/account

pick mv github github/bndw
# Change a username

pick mv github username [new username}
# Change a password

pick mv github password
...

from pick.

leonklingele avatar leonklingele commented on May 10, 2024

pick mv github password This is not intuitive.

# Rename an account

$ pick mv github github-new
# Change an account's username / password

$ pick edit github
Do you want to change the username (y/N)?
..
Do you want to change the password (y/N)?

$ pick edit github [user/name/username]
Enter a new username..

$ pick edit github [pswd/pass/password]
Generate a new password for github (Y/n)?

from pick.

bndw avatar bndw commented on May 10, 2024

pick mv github password This is not intuitive.

Agreed, scratch that one.

mv command
I'm happy with adding a mv command for renaming accounts.

edit command
An interactive edit command sounds good, however I am not a fan of the variable argument naming, [user/name/username] and [pswd/pass/password].

I see no benefit in having the user make a cognitive decision about which variety to use. I'd much prefer to offer a single way to do a task.

$ pick edit github
Do you want to change the username (y/N)?
..

$ pick edit github username
Enter a new username..

$ pick edit github password
Generate a new password for github (Y/n)?

EDIT:
I'm conflicted, especially on the pick edit github username bit. I'd like to think/explore this one before rushing an implementation.

from pick.

bndw avatar bndw commented on May 10, 2024

We need to have an password-history, so your old passwords are not lost

I'm not sure I see the value of this; could you explain the use case?

from pick.

leonklingele avatar leonklingele commented on May 10, 2024

Imagine this scenario:

  1. Add new account with a custom / pick-generated password
  2. You now want to change the password with $ pick edit github password (or similar)
  3. Let pick generate you the new password and copy it to your clipboard
  4. Now I would go to Github and change the password there, but I somehow need to access the old password

IMO it's too risky not to store a complete history of an account's passwords (or at least the last two or so).

from pick.

bndw avatar bndw commented on May 10, 2024

Thanks, that makes sense. I wonder if we should consider the same for any other fields on safe.Account, for example username.

from pick.

leonklingele avatar leonklingele commented on May 10, 2024

Personally, I don't need a history for an account's username. A history of the passwords is sufficient.

from pick.

bndw avatar bndw commented on May 10, 2024

SGTM. I think adding a []string to safe.Account to hold previous passwords may be sufficient.

from pick.

bndw avatar bndw commented on May 10, 2024

This is now almost in develop and will be available in the next release. Thanks @leonklingele!

from pick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.