0%

Alfred realizes one-click extraction of SMS verification code

Now many site services have a 2FA mechanism, and services such as login or online payment need to send a text message. Enter the verification code after receiving the text message.

In response to this mechanism, the iPhone supports automatic extraction, which can be filled by clicking, while on the Mac, only Safari has a similar experience. If you use other apps such as Chrome, you will lose this experience. In order to solve this deficiency, a workflow is developed here to optimize the experience.

Download Link:Click Here

Effect

As above, wait for dozens of seconds after sending the message, when the text message is received, enter 2fa to evoke the workflow, select the verification code item, and press Enter to copy to clipboard
board, ⌘ + v fills the target input box.

Notice

  1. There are differences in the validity period of different verification codes, so workflow provides the option to set the validity period. By default, the SMS verification code received within 10 minutes is queried.

  2. In order to read text messages on Mac, Alfred needs to have disk access permissions

Principle

  1. Under the iPhone, you can set the received SMS including iMessage to be forwarded to the Mac device, which ensures that the Mac can get the verification code SMS
  2. SMS messages under Mac are all stored in /Library/Messages/chat.db, Alfred can set permissions to read the DB file to get SMS messages
  3. Use regular expression to extract verification code

Write at the End

After the above operation, it will be more convenient.

img