Disclaimer: Use this at your own risk. Automating two factor authentication will reduce security and nullify any advantages provided by it
This document is aimed at providing a solution on Android devices for the annoying number of 2FA requests caused by trying to login to any University of Michigan service. Please note that using this script is as good as not having 2FA enabled, so do consider the security implications before proceeding.
-
Install Duo Mobile on your device and set up your account normally as per this ITS document. If you are already using Duo Mobile on your device you can skip this step
-
Download Tasker from the Play Store ($2.99)
-
Download AutoNotification
- AutoNotification is a plugin for Tasker that enhances Tasker's ability to manipulate and interact with notifications
- AutoNotification is part of AutoApps, a family of plugins developed by joaomgcd
- AutoNotification is free with ads and an ad-free version can also be purchased through the AutoApps app
-
Download the DuoAutoAccept.tsk.xml from the repository
-
Import the task into Tasker (long press the Tasks tab)
- Once you have imported the task you should see it listed under the Tasks tab with the name "T"
- Feel free to open the task and look at and modify the steps used to automate the process
- If the script takes too long/fails to work correctly, try to tweak the time interval in Step 4
- To link the task to the Duo Mobile app, we must first create a profile that listens for a Notification UI Event and then runs the task when the appropriate event was fired. To do this, first add a new profile
- Select "Event" for the Profile type
- Select "UI" for the Event category
- Select "Notification" for UI Event type
- Give the profile a title if you desire and then select "Owner Application"
- In the list of apps that appear, select Duo Mobile then tap back
- Tap back again to go to the profile tab. You will be prompted to select a task to link to the profile. Select the imported task. You have now linked the task to the profile!
- Your phone should now accept any Duo Mobile Notifications automatically.