iKenndac / Tofu

An easy-to-use two-factor authentication app for iOS
https://tofuauth.com
ISC License
498 stars 66 forks source link

Double tap to copy + optauth URL Scheme #19

Closed ThinkChaos closed 5 years ago

ThinkChaos commented 5 years ago

As the title says, you can now double tap to copy any code. I also added the otpauth URL Scheme to the app so links like otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example will open in Tofu. This also allows opening QR Codes in Tofu!

calleluks commented 5 years ago

Hey @ThinkChaos, thanks so much for the PR! I'm sorry I might not have time to look at it for a couple of weeks. It doesn't mean I don't appreciate it, I just have bit too much on my plate right now. Thanks for understanding!

ThinkChaos commented 5 years ago

SwiftNotice

I agree that SwiftNotice doesn't really look like something Apple would do, I didn't have any better idea though and have no experience writting UI code, so wanted a simple solution. Maybe a notification like popup would be a good fit? That's what Apple does in the camera app when scanning a QR code:

Image

Copying

I think it's important to have the contextual menu because that's the UX people are used to. I'd still like to have a faster way to copy the code. What about a UITableView swipe right action? Like the delete swipe but the other way.

ThinkChaos commented 5 years ago

The commit I just pushed switched to a UIAlertController on successful account import.

calleluks commented 5 years ago

Maybe a notification like popup would be a good fit?

Interesting—I hadn't thought of that! Let's go with the UIAlertController for now and maybe try out the notification in the future.

What about a UITableView swipe right action? Like the delete swipe but the other way.

As long as we have a way to clearly communicate that the item now is copied to the clipboard. Maybe the swipe action could say "Copy" and then when it's activated it can change to "Copied"?

Is it OK if I go ahead and merge this PR in without the double tap gesture, given the issues with the HOTP "Next"-button?

ThinkChaos commented 5 years ago

As long as we have a way to clearly communicate that the item now is copied to the clipboard.

Maybe the swipe action could say "Copy" and then when it's activated it can change to "Copied"? Yeah that's what I was imagining.

Sure go ahead!

calleluks commented 5 years ago

Merged as 86040a1417921171677888052ba3f3a8d525d423. Thanks so much @ThinkChaos!