jstaf / onedriver

A native Linux filesystem for Microsoft OneDrive
GNU General Public License v3.0
1.96k stars 96 forks source link

Cisco Duo (2FA) support #259

Closed Eraph closed 2 years ago

Eraph commented 2 years ago

I want to start by thanking you for your great work on this!

My workplace recently adopted Cisco Duo for 2FA. After entering my Microsoft account credentials I'm presented with this screen:

image

My machine has a Duo client installed and is recognised as such by browsers, Teams, etc. At this point it should send a prompt to my phone so that I can authorise the login.

I suspect in the case of Onedriver there is some kind of security setting preventing the auth window from interacting the installed instance.

jstaf commented 2 years ago

Not sure what could be causing this, but as a workaround, there is a --no-browser option that will allow you to login using your browser of choice. Use the following instructions to login on the command line (it will give you a URL to visit on the device/browser of your choice, just copy paste the URL Microsoft redirects you to when you successfully authenticate).

export MOUNTPOINT=/path/to/whatever/directory/you/want/to/mount/things/at
export SERVICE_NAME=$(systemd-escape --path "$MOUNTPOINT")
# this special command will login to onedriver and exit, saving the credentials in a spot
# that the GUI knows to look for it
onedriver -a --no-browser -c "~/.cache/onedriver/$SERVICE_NAME" $MOUNTPOINT

Regarding actually solving the error, do you see the same error happen if you use Gnome Web/Epiphany as your browser when logging in to onedriver using the --no-browser option? onedriver uses WebkitGTK as its embedded browser, which is the same engine that's used by Gnome Web/Epiphany. If you can reproduce the error there, then we know it's a problem with WebkitGTK itself not playing nice with your Duo client.

Eraph commented 2 years ago

Thanks! I got further with the instructions you provided, now I have to battle with my organisation's security team to allow access. I tried with Gnome Web and got the same error as reported so as you say it looks like a problem with WebkitGTK.