HomeTaskerTasker Authentication Helper (2-step verification)

Tasker Authentication Helper (2-step verification)

Sick of 2 step authentication? Me too!

We all know that security online is very important.

“Your Google verification code is 431973”

Oh, come on! I want to be secure, but how many times do I have to tell you: ‘It’s me Google!’. With security, you can’t have the cake and eat it at the same time… or can you? This is where Tasker Authentication Helper comes in!

Tasker Authentication Helper

I’m going to use Tasker Authentication Helper to get the code out of the text message, no matter what the text message is, then send it as a clipboard to other devices via Join? Sounds good? I think this should save me a lot of time, especially when used with the 2-step authentication systems. And while I’m at it, let’s make the project as universal as possible, so it would work with all verification messages!

If you are REALLY concerned about what devices you are sharing this clipboard with, you can limit the devices receiving the code to an active PC in Tasker.

I have to admit, that most often the simple profiles are the one that solves the annoying issues. Tasker Authentication Helper is very simple. It took me a while to fail miserably at regex. I have not been able to find a single regex formula, but the profile works well with 2 filters working together. If you are a PRO in regex, feel free to combine both formulas together and let me know!

Authentication Helper
Profile: Pin Code Txt 
	Event: AutoNotification Intercept [ Configuration:Event Behaviour: true
			Notification Type: Only Created Notifications
			Notification App: Signal
			Notification Text: pin|code (regex) (case ins)
			Package Name: org.thoughtcrime.securesms ]
Enter: Grab A Code 
	A1: Variable Search Replace [ Variable:%antext 
		Search:(code|pin).*?\d+ Ignore Case:On Multi-Line:On 
		One Match Only:On Store Matches In:%code 
		Replace Matches:Off Replace With: ] 
	A2: Variable Search Replace [ Variable:%antext 
		Search:^(.*?)\d+ Ignore Case:On Multi-Line:On 
		One Match Only:On Store Matches In:%code 
		Replace Matches:Off Replace With: ] If [ %code1 !Set ]
	A3: Variable Search Replace [ Variable:%code1 
		Search:\d+ Ignore Case:On Multi-Line:On One Match 
		Only:On Store Matches In:%auth 
		Replace Matches:Off Replace With: ] 
	A4: Set Clipboard [ Text:%auth1 Add:Off ] 

I’m using AutoNotification (*but nothing should stop you from using a built-in Tasker’s SMS received condition – further modifications needs to be done to variables) to intercept the message. A simple filter of the %antext (pin|code)  will assure that I don’t start assigning any values without a reason. Let’s not run a task if we don’t have to.

To fish out the code from a text message we are going to use 2 regex filters. This should prevent incorrect values from being assigned:

  • a text with a number, but without pin or code word
  • a text with a number that is not a pin or code
  • a text with multiple numbers – capture the first match after code/pin
  • a text with multiple numbers where the code/pin word is placed after the code

Please test the message, to make sure that your messages are being filtered accordingly.

Tasker Authentication Helper – regex

To capture the actual code, I’m going to use Regex. I have several different variations stored on my phone and I’m going to use it as an example. I tried to cover the biggest number of scenarios possible, but if your verification text falls outside of the scope of my regex filters – you will have to modify it to your needs.

Let’s start with capturing the numbers after the words pin/code (case insensitive) – I’m using www.regex101.com for this.


The result is good, but I failed with the last example. Our matches are:

code is 431973
PIN is 4044

Using search/replace action I will store the matches in an array %code. Our match will be placed in the 1st element: %code1. The %code1 won’t be set if the verification text follows the last example. If that’s the case I can set another Regex filter:


Instead of building a very complicated Regex filter (and mostly because it’s a task way above my understanding of Regex) I will just filter the results again. In both circumstances the second filter will be the same:



The result of the second filter is stored in the %auth array as the first element %auth1. This variable is used to set a clipboard and shared with other devices with Join app.


Tasker Authentication Helper project works fast and speeds up the login in times. I think I’m getting too old to remember the short numbers, or simply too old to go and find my mobile each time I want to log in anywhere without compromising my security. I hope you will find this project useful. Share it with your friends and give it a like while you are here.

Project Download

Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.


Nothing says "Thank you" better than keeping my coffee jar topped up!


Support me on Patreon and get an early access to tutorial files and videos.


Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

New to Tasker?

Tasker Quick Start – Getting started with Tasker

From newb to not so newbie in 10 min

Best Tasker Projects

How to use Raspberry PI as WOL (wake on lan) server

While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

How to wake on LAN computers and put it to sleep with Power Menu,...

How to Wake on LAN properly via Android, Alexa, Google Assistant and Web

7 awesome Bluetooth keyboard shortcuts for Android

7 unique Android shortcuts that you can add to any Bluetooth keyboard.

Smart overnight charging with Tasker

Still keeping your phone plugged in overnight? Try smarter overnight charging with this profile

One thing that Join app can’t do and how to fix it with Tasker

It's not possible to share the clipboard automatically between join accounts registered to 2 different emails. But you can fix this with tasker.

Essential Guides

Tasker: Seconds into DD:HH:MM:SS (dynamic)

It's time to.... ok it's a pun, but I will show you how to master time and convert seconds to DD:HH:MM:SS dynamically

4 ways to organise Tasker projects

Keep your Tasker tidy!

A better way to store Tasker credentials

The more clever way of managing credentials

Annoyed with dozens of AutoApps populating your app drawer? Here is a fix!

Clear your app drawer from the clutter in seconds

Putting AutoTools pie chart to a good use – SSID logger

Who wants a piece of the pie (chart)?