Commit Graph

29 Commits (e8c2d5c2cf9811cca8522d709c135187c25cbc42)

Author SHA1 Message Date
Nate Graham e8c2d5c2cf Reduce default size of main window
The main window is sort of excessively large right now. This commit
reduces it to a more reasonable size.
2021-12-19 15:46:06 +00:00
Johan Ouwerkerk 75a167665b refactor: switch to page navigation from C++
Rework QML to use the ViewModel classes and use the C++ flow classes to
drive QML page navigation.
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk 131e59aa3a refactor: move property assignments to main.qml
Ensure that all logic for property assignment is concentrated in
main.qml in preparation for the introduction of view model classes.
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk 12e060923e refactor: UI (page) navigation from C++ code
An app::Navigation class is introduced with an API very similar to the
Kirigami.PageRouter in QML. This new class is responsible for pusing
populated view model classes from C++ into QML ownership and triggering
appropriate navigation events. On the QML side a signal handler
forwards these calls to the Kirigami.PageRouter to perform the actual
navigation in the UI.

This construct paves the way for moving state transition and related
logic out of QML and towards C++, since this logic is currently mostly
concerned with page navigation in Keysmith. Ultimately that transition
should make the QML (page) views more easily re-usable.
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk 571afeacdf refactor: port navigation to Kirigami.PageRouter
Replace existing manual manipulation of the application page stack with
a more declarative setup using Kirigami.PageRouter. This change does
not yet address the control flow: pages are not yet properly decoupled.
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk ad4308793b fix: show an appropriate error when a provided password fails its challenge
With this change the user now gets appropriate error feedback when trying to unlock their accounts using an incorrect password.

Additionally password entry is temporarily suspended in the UI while key derivation (etc.) is in progress.
This should help convey the idea that "something is happening", or rather avoid the impression that "nothing happens" or "this is broken" when in fact key derivation may simply be slow depending on the machine.
2021-01-20 06:17:48 +00:00
Johan Ouwerkerk 8d1a88b8df fix: make sure to display password setup page again when appropriate
The feature to accept accounts from the command line via otpauth:// URI inadvertently broke the initial password setup flow.
With this change password setup and unlocking should now work correctly again in all cases/flows.

Issues: #14
2020-11-09 19:20:08 +01:00
Johan Ouwerkerk bc91de7e5b feat: support receiving a new account via otpauth:// URI from the commandline in the UI
This change implements necessary control flow to pick up on accounts being passed to Keysmith via commandline options.

This change covers UX only for the happy flow case in which the received account is a valid otpauth:// URI.
If such an URI is passed to Keysmith, then the Add Account form is automatically pushed on the page stack and pre-populated with data received from the commandline.
With this UX, if the account is valid the user may either accept it immediately or tweak settings (most likely account name/issuer) to make it valid.

Issues: #7, #14
2020-10-30 13:27:32 +01:00
Johan Ouwerkerk b0bc89810e feat: add actions to dismiss/cancel the add account form
Users may now cancel adding an account and dismiss the page.
This change is particularly relevant in the context of an account that is being added via URI passed on the commandline: the user may now explicitly reject it.

Additionally quitting Keysmith from the add account form is now also supported, hidden behding a boolean flag.
This will be useful for the initial page when receiving an account via URI from the commandline: the user may reject the account and quit Keysmith via a single action.

Issues: #7, #14
2020-10-30 13:25:33 +01:00
Johan Ouwerkerk d048adf921 UI/UX to ask for the accounts password on start up
With this change Keysmith now prompts the user to either:

 - setup a new password
 - supply an existing password (if detected)

Additionally the organisation/structure of the QML is cleaned up a bit.
All QML pages are dedicated QML files and a few signals are introduced
to provide slightly better encapsulation/decouple interdependencies.
2020-04-23 19:00:36 +02:00
Johan Ouwerkerk 768ccdba97 Refactor and update input validation
This change fixes input validation for the following cases:

 - Check that entered account names are still available
 - Working validation for time steps (input mask was completely broken)
 - Allow longer tokens: liboath is no longer used, Keysmith can handle it

Additionally the QML code is refactored significantly:

 - Extracted the main accounts overview page
 - Extracted the add an account page
 - Completed the internal renaming of "Oath" to "Keysmith" for QML types
2020-04-04 11:22:15 +02:00
Johan Ouwerkerk 6ae5f7be21 Rework main page UX:
- Get rid of cards in favour of a more plain list view
 - Implement removing (deleting) accounts
2020-01-28 17:56:39 +01:00
Johan Ouwerkerk a0caf83da2 Use the new Account models.
Drop the AccountDetailsPage instead of trying to update it: see issue #7

With this change issue #2 should be fixed
2020-01-28 06:49:06 +00:00
Johan Ouwerkerk 40a5491026 Remove application title property binding: it is redundant and causes QML warnings at runtime. 2019-12-31 18:20:58 +01:00
Bhushan Shah f4264b9c8c app: add i18n support 2019-12-31 19:34:33 +05:30
Johan Ouwerkerk e6a53b6f3b Rebrand otpclient as Keysmith 2019-10-21 19:16:51 +02:00
Johan Ouwerkerk 4d7bf2f975 Add a rudimentary details page for accounts and wire up navigation to/from it.
The account details page has a kind of modality:

 - hide mode: in which the user is shown the account info but sensitive information such as secret keys should not be displayed openly visible.
 - show mode: the same, but in this case all details are openly visible. This will be useful for showing QR codes explicitly.
 - edit mode: in which the user may edit account details (all except the name).
2019-10-20 14:09:39 +02:00
Johan Ouwerkerk c64273355a Refactor: extract the token details form UI to its own re-usable component. 2019-10-20 14:09:39 +02:00
Johan Ouwerkerk 3734e908a9 Hide main 'Add' action if the add account form is already opened.
In this way we can avoid the confusing situation with multiple add account forms open by mistake.
2019-10-20 14:06:22 +02:00
Johan Ouwerkerk 042b51d183 Use the unsigned long long validator for the HOTP counter input field in the QML UI. 2019-10-02 21:56:58 +02:00
Johan Ouwerkerk 668e912dfe Apply the name validator to the account name input field in the QML UI. 2019-09-30 20:25:56 +02:00
Johan Ouwerkerk 73acbb68ae Add the new base32 secret validator to the UI: attach it to the secret input field. 2019-09-29 12:57:07 +02:00
Johan Ouwerkerk c37bf03b8e Fix typo: OAth -> Oath (the name is oath or OATH). 2019-09-29 12:40:22 +02:00
Johan Ouwerkerk 8d40008201 Use a SpinBox for more appropriate UI/UX when entering token lengths
Due to our use of liboath for generating the actual tokens, we also support only a limited range of valid token lengths.
This means that it is more user friendly to express those limits  directly in the UI through a SpinBox instead of allowing the user type in values we do not currently support.
2019-09-28 00:22:55 +02:00
Johan Ouwerkerk 4cff5519ed Automatically show the "add OTP" form when there are no OTP tokens yet on start up.
This is a small UX improvement to make it a little easier to get started with the app.
2019-09-25 11:17:48 +02:00
Bhushan Shah 5a1d26e3b8 Add animation for showing and timeout 2019-03-25 19:30:45 +05:30
Bhushan Shah 75e171a11a Show refresh button only if type is the HOTP 2019-03-25 17:50:05 +05:30
Bhushan Shah 2b013ac8c9 Use model.roleName instead of the roleName
This seems to workaround the issue with the Kirigami, and makes OTP
refresh correctly. Now it is actually usable :)
2019-03-25 17:19:34 +05:30
Bhushan Shah 8819d205f9 Initial code for OTP client
It uses the oath-toolkit[1] provided library liboath to generate the 2FA
codes, both TOTP and HOTP based. Currently it is largely untested. From
initial rough testing it seems that auto-refreshing of code is not
working. Also button to refresh token for HOTP is also dummy at moment.

Some todo items include,

- Verify the generated oath code is correct
- Make refreshing token work
- QR code scanning
- Backup and Restore of accounts
- Clipboard support to automatically copy code.
- Encrypted storage of the secret token

This code is largely based on the authenticator-ng[2] application by the
Rodney Dawes and Michael Zanetti for the Ubuntu Touch.

[1] https://www.nongnu.org/oath-toolkit/
[2] https://github.com/dobey/authenticator-ng
2019-03-25 02:58:56 +05:30