HowTo: Get a passcode from DUO Mobile working on the Pinephone
#1
Hey All,

I was forced to use Duo Mobile to use with my work, and I wanted to share a couple of experiences to help anyone else that may have this issue too. First, DUO now supports WebAuthn, I had to ask my IT department to get it to work. This will allow you to use a Yubikey (or other U2F device) on Firefox (as normally it is Chrome only). I just ordered a USB-C Yubikey as well, so I am curious to see if I can get that working on the Pinephone.

I was also successful in getting a passcode working with Gnome Authenticator, thus not needing the DUO mobile app (for those who don't have to use DUO, the "official" way to get a passcode working is to use their app, which is an Andriod/iOS app only. It does not natively support using third party apps, and I suspect that is by design). There is a python script to get it working:

https://github.com/kop316/duo-cli

You can use just the python script only you so choose, but you can also export the secret to your favorite 2fa app (like Gnome-authenticator). Use the

Code:
./duo_export.py

script to export your secret. Note that it uses HOTP, do you have to incriment it at every log in.

As a quick note, look at all of the "Data" in duo_activate.py , and make sure they are reasonable values too. I can only assume they have those values to check them.
  Reply
#2
(02-22-2021, 12:27 PM)kop316 Wrote: Hey All,

I was forced to use Duo Mobile to use with my work, and I wanted to share a couple of experiences to help anyone else that may have this issue too. First, DUO now supports WebAuthn, I had to ask my IT department to get it to work. This will allow you to use a Yubikey (or other U2F device) on Firefox (as normally it is Chrome only). I just ordered a USB-C Yubikey as well, so I am curious to see if I can get that working on the Pinephone.

I was also successful in getting a passcode working with Gnome Authenticator, thus not needing the DUO mobile app (for those who don't have to use DUO, the "official" way to get a passcode working is to use their app, which is an Andriod/iOS app only. It does not natively support using third party apps, and I suspect that is by design). There is a python script to get it working:

https://github.com/kop316/duo-cli

You can use just the python script only you so choose, but you can also export the secret to your favorite 2fa app (like Gnome-authenticator). Use the

Code:
./duo_export.py

script to export your secret. Note that it uses HOTP, do you have to incriment it at every log in.

As a quick note, look at all of the "Data" in duo_activate.py , and make sure they are reasonable values too. I can only assume they have those values to check them.

github url 404
  Reply
#3
(01-16-2022, 03:07 PM)transfer76 Wrote: github url 404

code moved to gitlab:

https://gitlab.com/kop316/duo-cli
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  asterisk or FreePBX on pinephone? vanja 0 212 06-16-2026, 09:24 AM
Last Post: vanja
  Jami on Pinephone [ IM and VOIP ] p1trson 15 22,261 06-16-2026, 05:02 AM
Last Post: marlboro1950
  Movuan distribution for PinePhone merom 6 6,534 06-04-2026, 02:10 AM
Last Post: merom
  Latest firmware for PinePhone modem! Subsentient 106 229,674 04-03-2026, 08:37 AM
Last Post: baptx
  Fedora + Phosh for PinePhone njha 77 217,080 01-14-2026, 12:22 AM
Last Post: tllim
  Difficulty with openSUSE Tumbleweed Install PinePhone Beta danm1988 0 764 11-17-2025, 07:49 AM
Last Post: danm1988
  baremetal via Zig on PinePhone - JumpDrive help please WhiteHexagon 1 3,910 07-07-2025, 10:33 AM
Last Post: WhiteHexagon
  Slarm64 on PinePhone [Unofficial Slackware ARM - 64 bit] acid andy 40 64,412 12-28-2024, 12:19 AM
Last Post: mara
  Office applications for the Pinephone Peter Gamma 2 5,227 09-05-2024, 09:22 AM
Last Post: Peter Gamma
  Struggle to install LibreOffice on the PinePhone Peter Gamma 50 72,628 07-26-2024, 10:35 PM
Last Post: Peter Gamma

Forum Jump:


Users browsing this thread: 2 Guest(s)