Conversation
…ata, usable in image editors, and as temp files, paste-able wherever
|
I actually got QR Codes working too, however since i have no experience with UI, it can currently only be copied to clipboard, either as image data, or as image file. |
| } | ||
|
|
||
| - (NSString *)qrString:(NSArray *)input { | ||
| return [NSString stringWithFormat: @"otpauth://totp/%@:%@?secret=%@&issuer=%@", input[0],input[1],self.secret,input[0]]; |
There was a problem hiding this comment.
This is currently implemented in
OneTime/OneTimeKit/Models/OTBag.m
Line 166 in 8839590
|
|
||
| @implementation OTQRCreatorService | ||
|
|
||
| + (CIImage *)generateQRCodeImageFromString:(NSString *)string { |
There was a problem hiding this comment.
This is implemented in
OneTime/OneTimeKit/Services/OTQRService.m
Line 56 in 8839590
leptos-null
left a comment
There was a problem hiding this comment.
Thanks for your thoughts and contributions on this!
Sorry for some of the overhead - some of the code in the second commit is already implemented in this repo.
|
Probably for the best, as i said, i just hacked together what i found in docs / web. |
This is an experimental pr to address #3

Currently, it just introduces the option to copy the token secret to clipboard:
Until this can be implemented in production, there needs to be some access control, basically using the Apple "User Authentication" through Biometrics/Password.
I am not an Apple / Objective-C developer, so i have no idea how to properly implement this, however i have found the Apple Docs for the required functions:
https://developer.apple.com/documentation/localauthentication/logging-a-user-into-your-app-with-face-id-or-touch-id and
https://developer.apple.com/documentation/localauthentication/lapolicy/deviceownerauthentication specifically.
The proposed flow is: Upon clicking the extract function, the function is called, the User authenticates, and a flag is set to keep the user authenticated either until the app is closed, or a certain amount of time passes. I don't know if macos works natively with that function or some other way to authenticate is needed for the mac app.
I am not concerned with creating QR Codes, but technically that should be easy enough to implement, provided there is a function / library to create them, the data should be possible to recreate.