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

navigator.credentials is broken in 'window' mode (chrome/browser mode is ok) #26

Open
fix opened this issue Feb 11, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@fix
Copy link

fix commented Feb 11, 2023

Describe the bug
On macosx (not tested on other plateform though, but might be the same issue), navigator.credentials existing but does not work properly when navigator.credentials.create({publicKey:{...}}) is called
To Reproduce
open the inspector and type:

navigator.credentials.create({
  publicKey:{<your payload>}})

Note this is NOT due to window not focused (an issue in itself on applewebkit), before you asked, i have checked this is not the issue

The error raised is NotAllowedError: Operation failed

Expected behavior
Normally when navigator.credentials.create is called, a special nativve pop up is displayed offering the user to choose which Fido2 credentials to use (if you try in safari or other browser this is what happens).

Specifications

  • OS: MacOSX
  • neu CLI: v9.4.0
  • Neutralinojs binaries: v4.9.0
  • Neutralinojs client: v3.8.0

Additional context
I believe the credentials connector bindings to native MacosX (and likely other OS) UI for FIDO2 management is not shipped with the executable.

@fix fix added the bug Something isn't working label Feb 11, 2023
@fix
Copy link
Author

fix commented Feb 13, 2023

I have checked on webview repository and there is a warning in the README saying

it does not attempt to support user interaction features like alert(), confirm() and prompt() and other non-essential features like console.log()

navigator.credentials do need user interaction (usually a popup requesting to select a fido2 device and asking user to enter a pin)

I guess there is no way this can change. The only way then to be independant from web view would be to bind navigator.credentials to opensourc libfido2. The dependencies could be distributed independently

I have unfortunately very little knowledge of C so right now i am using Neutralino.os.execCommand to run the libfido2 utilities. If somebody can bind it directly in some kind of Neutralino.custom.credentials.create and Neutralino.custom.credentials.get I would be happy to pay for it.

@shalithasuranga shalithasuranga transferred this issue from neutralinojs/neutralinojs May 29, 2024
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

1 participant