Automatically accept Duo Mobile pushes on Android (Still testing)
This is a tutorial on how to automatically accept MFA pushes from Duo Mobile using MacroDroid along with the tasker plugin AutoNotification
DISCLAIMER: Doing this ruins the whole point of Multi-Factor-Authentication and indubitably decreases the security of your account (NYU login in my case). You be the judge of whether the reduced security is worth the convenience of not having to fumble with your phone everytime you log in (it is haha).
We’re going to exploit the fact that the pushes can be approved through notifications on android.
Taskers
Quick introduction to taskers: a tasker app allows you to create “macros” which are basically a set of triggers that have corresponding actions (If this happens then do that).
The most famous one is Tasker (cool name) but it only has a paid version and it is not that user-friendly.
MacroDroid on the other hand is more intuitive and has a free version.
Outline
In our case, the trigger is when the duo push notification is intercepted and the action is to press the “approve” button. For such interactions with notifications, then AutoNotification plugin comes in handy.
Installation
Download both MacroDroid and AutoNotification and make sure to accept every permission request.
Edit: The AutoNotification plugin has a free version but you have to watch an ad everyday for it to keep working. The full version costs around $2 and I think it’s worth it for what it provides(I was wondering why the macro stopped working after a day and it was just because of the trial expiration). I would recommend you try it with the free version before deciding whether or not you want to spend the money.
Creating the macro
The first thing to do is to open Macrodroid, select Add Macro and you should get something similar to this:
Trigger
Since for the trigger we are going to be using the AutoNotification plugin, type in “plugin” in the trigger searh bar, select Local/Tasker plugin and select AutoNotification.
Select the one shown: AutoNotification Intercept Event
Configuring the intercept: The only two values you need to worry about are Action Type(for us it is when a notification is created) and Apps (the name of the application we are trying to intercept from, which is Duo Mobile).
Tap the little tick icon at the top right and we have the trigger ready!
Note: You will see this after tapping the tick, do not change any values and just tap Ok.
Swipe to the Actions tab for the next step.
Actions
You might have noticed that when you usually approve the push through android notifications, you have to press something like “Tap to view actions” before being given the option to either Approve or Deny.
Likewise, the first action for AutoNotification would be to press the “Tap to view actions” followed by the second action which would be press “Approve”.
Similar to the trigger, since we are using a plugin, search for that and select Locale/Tasker plugin.
Next, select AutoNotification and then select the next option which is AutoNotifications actions.
1.Once again, set the Apps to Duo Mobile
2.The only other thing we need to add here is in Button Text Filter
Go to button text
Select No when asked if you need help selecting the notification button text
Here, you have to type in what usually appears first in your push notification.(case doesn’t matter as we checked that box earlier)
It should be “Tap to view actions” but my phone is in French so mine is different.
You can always double check by sending yourself a push.
Also make sure you also have the Case Insensitive option checked before going back.
Tap the little tick and once again, do not change any values and just tap Ok when you see the following screen
Now, the next step would be to have a second action to interact with the now expanded options “Approve” or “Deny”.
In our case, we want to approve it so, we just need to add another action and follow the same steps as above but the the button text should be “Approve”.
If you’ve come so far (we’re almost done I promise), your macro should look like this:
If somehow your actions are in the incorrect order, tap the rearrange button and make sure the “Tap to view actions” action is done first and then the “Approve” action.
Save the macro under any category you want (I usually leave mine as uncategorized) and you should be set!
Now anytime you receive a duo push, your device should automatically accept it.