macOS supports autofilling security codes sent to your iPhone. This is a great feature if you are using Safari, but it is not supported in other browsers (e.g., Chrome) and apps (e.g., an Electron app). This Alfred workflow adds this feature across the system.
Launch Alfred.
Enter the configured keyword (2fa
by default).
Select the correct two-factor code if it isn't the first one. You can also use shortcuts like Command+2 or Command+3 to select and paste in a single go.
If you did not use Command+2, or another number, shortcut then press enter to paste in the currently active text field.
This workflow builds upon https://github.com/squatto/alfred-imessage-2fa. One of the major differences is that this workflow uses simple bash
instead of php
, thus eliminating the need for anything more than what your system already has.
Icon made by flaticon.com/authors/freepik from www.flaticon.com.
chat.db
) where now it saves an encoded version of the message in attributedBody
field instead of the simpler, unencoded text
field. text
is still populated when the message is first received, but gets converted to attributedBody
at some later time. This workflow should still work for new messages, but will not find older messages yet.