Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cannot add Webauthn Devices #55

Closed
bones1014 opened this issue May 4, 2021 · 30 comments
Closed

[BUG] Cannot add Webauthn Devices #55

bones1014 opened this issue May 4, 2021 · 30 comments
Labels
bug Something isn't working

Comments

@bones1014
Copy link

Describe the bug
When trying to add a Webauthn Device the button just flashes briefly but won't start adding a device.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Security under Personal
  2. Click on Add Webauthn Device
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (feel free to add relevant information)

  • Twofactor_Webauthn Version: 0.2.9
  • Nextcloud Version: snap 20.0.9
  • PHP Version: 7.4.15
  • Database with Version: mysql 5.7.34
  • Browser with Version: Opera 76.0.4017.94 and chrome 90.0.4430.93 (Official Build) (64-bit)
  • OS: Windows 10 build 19042.964

Webauthn Devices
Please list here your webauthn devices, which relate to the issue, eg:

  • Yubikey 5 NFC
  • Windows Hello

Nextcloud error log
Please attach the nextcloud error log, if applicable

Browser error log
Please attach the error from the developer console of the browser, if applicable

Additional context

Error index Exception: Argument 1 passed to OC\Core\Controller\WebAuthnController::finishAuthentication() must be of the type string, null given, called in /snap/nextcloud/27434/htdocs/lib/private/AppFramework/Http/Dispatcher.php on line 169
@bones1014 bones1014 added the bug Something isn't working label May 4, 2021
@michib
Copy link
Collaborator

michib commented Jun 3, 2021

Hi @bones1014,

i'm not able to reproduce the issue. It works for me. But from the logmessage, it looks like you are trying to setup a first factor authentication with your yubikey? Thats not related to this twofactor provider, the firstfactor authentication is provided by nextcloud itself.

If it happens on setting up a key for this twofactor provider, could you provide more information how to reproduce the issue?

@isdnfan
Copy link

isdnfan commented Jun 8, 2021

Just tested successfully using latest docker NC 21.0.2 (version from 04.06.2021) and Two-Factor Webauthn 0.2.10

@bones1014
Copy link
Author

I'll give it another try since my snap updated recently. Thanks for looking!

@bones1014
Copy link
Author

There hasn't been any change to the way the app is behaving. I've removed and reinstalled the app and it still doesn't allow me to add a webaunth device. I've tried in different browsers and they are all the same.

@michib
Copy link
Collaborator

michib commented Aug 2, 2021

Is it still the same error Message?

@bones1014
Copy link
Author

It doesn't give any error message. It just doesn't allow me to add a device. It just flashes to the graphic like it's going to add one and then just goes back to the add button.

@michib
Copy link
Collaborator

michib commented Aug 2, 2021

Could you provide a screenshot of what you are trying to do?

@bones1014
Copy link
Author

image
That button just flashes to "please plug in...." It's too fast to read. The box to add a device doesn't appear.

@michib
Copy link
Collaborator

michib commented Aug 2, 2021

And there is no further error entry in the nextcloud log?
Could you check the console of your browser? You can open it with pressing F12. Can you check if there is some error message (or anything other) logged?

@bones1014
Copy link
Author

@michib
Copy link
Collaborator

michib commented Aug 2, 2021

That are the contents of the console? To be honest, i doubt that. That's the sourcecode of the page

@michib
Copy link
Collaborator

michib commented Aug 2, 2021

Please provide a screenshot of what you just copied. Maybe i can point you to the right direction afterwards.

@bones1014
Copy link
Author

When I have the console open and then click the Add Webauthn Device button I get this:
image

@michib
Copy link
Collaborator

michib commented Aug 2, 2021

Do you have you installation provided by https?

@bones1014
Copy link
Author

I thought I did. I was primarily accessing it on my local network and I guess it didn't like the HTTPS. I just went through the web address with is running HTTPS and has no problem and it's working. huh, I didn't think about that. Thanks for the guidance.

@michib
Copy link
Collaborator

michib commented Aug 2, 2021

Ah alright. Thanks for the feedback. I will add some error handling for this. Webauthn only works through https by spec, the browsers restrict http connections.

@Bondarz
Copy link

Bondarz commented Oct 28, 2021

Same here. I used Nextcloud Storageshare by Hetzner. Windows 10, Firefox 93, YubiKey5.
U2F works without a probem. No chance to add WebAuthn after enter my FIDO2 PIN. YubiKey cannot be saved.

@michib
Copy link
Collaborator

michib commented Oct 28, 2021

Please! Provide some more information.
Is there anything in the log of nextcloud or the console of your browser?

@Bondarz
Copy link

Bondarz commented Oct 28, 2021

Problem also exists with Mastodon, by the way:
mastodon/mastodon#16694 (comment)

I was able to save the keys with the Brave Browser, then the login also works under Firefox. Only the registration of a key does not work with Firefox.

Is this correct? ;)
grafik

@Bondarz
Copy link

Bondarz commented Oct 29, 2021

Firefox:
grafik

@michib
Copy link
Collaborator

michib commented Oct 29, 2021

Are you trying to setup a 2FA or Passwordless Authentication?

@Bondarz
Copy link

Bondarz commented Oct 29, 2021

Brave Browser V1.31.87
Nextcloud: Storage Share 22.1.1

With Brave i was able to add my FIDO2 Key, hope this could help:
Brave1
brave.txt

@Bondarz
Copy link

Bondarz commented Oct 29, 2021

Are you trying to setup a 2FA or Passwordless Authentication?

Username/Password with U2F YubiKey
Than i tried Username with Webauthn/FIDO2 YubiKey

@michib
Copy link
Collaborator

michib commented Oct 29, 2021

I dont understand your answer. So are you trying to setup 2FA or Passwordless? U2F is not in the scope of this provider.

@michib
Copy link
Collaborator

michib commented Oct 29, 2021

From your screenshot it seems you are trying to setup Passwordless Authentication. This is not in the scope of this 2FA Provider. If its an issue of this Provider please open a new Bug. Your problem does not seem to be related to this issue.

@Muzosh
Copy link

Muzosh commented Nov 7, 2021

Hello @michib,

I'm having a same issue as the original author of this issue: after clicking on the button a small loading circle shows up for a split second and then disappears and nothing happens.

Immediately after clicking on the button there is a message "starting webauthn registration" and it is followed by this error:
image

It is logged right here:
image

BTW, I did not even tried to register any webauthn device, I just freshly installed this provider and tried to click on that button.
Nextcloud version: 21.0.2 and tried also with 21.0.5

@michib
Copy link
Collaborator

michib commented Nov 28, 2021

@Muzosh i think the error message indicates, that you should check your nextcloud setup. It has to run on a https connection. But i don't know what this error message exactly means. You can try to install the new released version 0.2.12 and provide the logs of the browser console and the server logs here.

@michib
Copy link
Collaborator

michib commented Nov 29, 2021

@Muzosh could you retry with version 0.2.13 and post the console entries of your browsers? Please remove any sensitive data before!

@Muzosh
Copy link

Muzosh commented Dec 1, 2021

@michib Here is the result of clicking the button after updating to 0.2.13:
image

As you have said, I'm running nextcloud on my own testing server with self-signed certificate. It is https connection but with invalid certificate that I had to allow when first connected to this server. So my problem might be in wrong configuration of the server.

Thanks anyway, I wanted to test your app because I'm creating a different two-factor as well.

@michib
Copy link
Collaborator

michib commented Dec 1, 2021

Yes localhost does not work in every browser afaik. For my development testing i am using a local domain like "cloud.net.local". Browsers are happy with it :-)
In this case i am closing the issue, please reopen or open another bug if it turns out that the issue is part of the provider and not of the server configuration.

@michib michib closed this as completed Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants