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

andOTP import: Usage count & icons #980

Open
ThiefMaster opened this issue Sep 5, 2022 · 4 comments
Open

andOTP import: Usage count & icons #980

ThiefMaster opened this issue Sep 5, 2022 · 4 comments
Labels
proposal A proposal for a new feature

Comments

@ThiefMaster
Copy link

The andOTP JSON export contains information related to the usage count and icon used. Maybe it could be used to populate the usage count in the Aegis vault, and also search in the enabled icon pack for a matching icon?

Having to do this manually for 50 entries would be a pain in the ass - and while I'll probably write a script to transform the JSON formats while preserving this info anyway, I think it'd be nice to have this as a built-in feature.


$ gpg --decrypt /tmp/adrian/otp_accounts.json.gpg 2>/dev/null | jq 'sort_by(.used_frequency) | map({issuer,label,used_frequency,last_used,period,thumbnail})[-5:]'
[
  {
    "issuer": "",
    "label": "GitHub - XXX",
    "used_frequency": 7,
    "last_used": 1651559963768,
    "period": 30,
    "thumbnail": "GitHub"
  },
  {
    "issuer": "Instagram",
    "label": "XXX",
    "used_frequency": 7,
    "last_used": 1656849111140,
    "period": 30,
    "thumbnail": "Instagram"
  },
  {
    "issuer": "",
    "label": "Amazon - XXX",
    "used_frequency": 8,
    "last_used": 1651040713229,
    "period": 30,
    "thumbnail": "Amazon"
  },
  {
    "issuer": "CERN",
    "label": "XXX",
    "used_frequency": 8,
    "last_used": 1648636180437,
    "period": 30,
    "thumbnail": "Default"
  },
  {
    "issuer": "CERN",
    "label": "XXX",
    "used_frequency": 59,
    "last_used": 1661435816507,
    "period": 30,
    "thumbnail": "Default"
  }
]
@ThiefMaster ThiefMaster added the proposal A proposal for a new feature label Sep 5, 2022
@alexbakker
Copy link
Member

The usage count is actually not kept in the Aegis vault file, but in the shared preference file. This is because we wanted to avoid the overhead of saving the vault after every tap of an entry. Some changes to the current import system would be required to support importing usage counts.

Automatic icon assignment to entries is part of another issue: #773. Once that's implemented, we can make use of it when importing from other authenticators.

@ThiefMaster
Copy link
Author

So currently there's no way to get the data besides tapping an entry over and over again (or using manual sorting) to manually bump its usage count if I want to get it near the top?

@alexbakker
Copy link
Member

Correct.

@michaelschattgen
Copy link
Member

Partially fixed this in #1172.

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

No branches or pull requests

3 participants