Replies: 6 comments 7 replies
-
I doubt I'll attempt this right away, but happy to look into implementation in the next few months. |
Beta Was this translation helpful? Give feedback.
-
I've actually been thinking about this for a while, for an unexpectedly silly reason: You have no idea how many times I've gotten an SMS notification with a code in it mirrored to my desktop, and clicked the "Copy '######'" action button on it expecting the value to be copied to my Linux clipboard. 🤣 And every time, a moment after I click that button, I realize how dumb that was. And then I start manually typing the code into whatever page generated the SMS, digit-by-digit. Like a CAVEMAN. So I've long thought about a feature in GSConnect that could solve just that general "Copy buttons don't work when mirrored" issue. If GSConnect could recognize when a notification includes a "Copy" button, and automatically replace the remote-device (Android-side) copy action with a local action that copies to the Linux clipboard instead, problem solved! Here are the two main sticking points that've stopped me from progressing with that idea: Internationalization and generalization. It's a fairly simple prospect for me to implement recognition of the copy button in notifications that my SMS app generates.1 It's not that hard to look for an action message that matches But the thing about that regular expression is, it's correct for copy notifications in my language, created by my SMS app. But other SMS apps may use a slightly different format. And for sure, the action string will be completely different for users who have their phone set to another language. So in reality, for this feature to work, the matching regular expression probably has to be more flexible, or even be a list of several different expressions appropriate for different apps. (Not that hard, as GSConnect knows the source application for each notification — in fact, it already contains code to recognize notifications from various SMS apps, for other reasons.) Then, once the code works for the variety of English-language apps, in order for that to work in other languages the regular expressions themselves need to be localizable strings that are first processed by gettext. I don't really see any way that you could implement appropriate matching without making the expressions themselves translatable. This just isn't going to work: const copy_msg = _('Copy');
const copy_re = new RegExp(`${copy_msg} "([a-zA-Z0-9]*)"`); For starters, So the expression itself almost certainly has to be translated as a whole. And localization of It's also not conceptually the same activity as output localization, and requires a different skillset. When translators create localizations for output messages, the primary concern is that their translation convey the same meaning as the source string. But when translating a matching regular expression, the source string is completely irrelevant. The correct expression to match the copy-action string used by, say, WhatsApp in French, doesn't depend on the regular expression used in English. It depends entirely on how WhatsApp formats their message in French, which may not be a direct translation of the English format. So, those issues were always what held me back from pursuing this further. I was confident I could make something that would work for me, but that's no good unless I'd be able to make it work for everyone. But it would be awesome to have. Notes
|
Beta Was this translation helpful? Give feedback.
-
Well... now I'm second-guessing myself on that. I was thinking primarily of locales that use the Latin alphabet in general — if you're in France and your bank sends you a 2-factor code, it may contain ASCII letters but I assume it wouldn't contain But if you're in, say, Russia, do they exclusively use all-numeric codes? Or might someone get a code like |
Beta Was this translation helpful? Give feedback.
-
I'm going to migrate this to Discussions, BTW, as that's a more appropriate venue for a conversation like this. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your input! Some thoughts:
|
Beta Was this translation helpful? Give feedback.
-
Thist just got a lot harder since Android 15, see the relevant KDE Connect bug: https://bugs.kde.org/show_bug.cgi?id=495146 |
Beta Was this translation helpful? Give feedback.
-
Problem statement
It's common for websites to do multi-factor authentication (MFA) using SMS (Wikipedia). This process has several steps:
I find this pretty unpleasant, for many reasons:
Proposal
It ought to be possible to do something easier for the user. For example, Apple has a feature where an iPhone can forward messages to a Mac, which then will autofill the form in Safari.
GSConnect could get a new plugin that triggers on SMS messages that look like verification codes. Once detected, we could do various things--possibilities include:
Implementation notes
Basic implementation strategies:
Some things to worry about:
Security notes
This may sound scary from a security perspective! Isn't the entire point of SMS verification to make the user prove they have a second device?
But I don't think it's really a big deal. The Messaging app in GSConnect already makes it possible for a connected PC to access security codes as they come in, and the Notification plugin can already make these easily surfaced.
Metadata
GSConnect version
50
Installed from
GNOME Extensions website
GNOME Shell version
42.9
Linux distribution/release
Ubuntu 22.04
Beta Was this translation helpful? Give feedback.
All reactions