hidglobal / digitalpersona-devices

DigitalPersona Security Devices support library
https://hidglobal.github.io/digitalpersona-devices/index.html
MIT License
69 stars 42 forks source link

WebSdk not found in react #33

Closed Bartik-ing-programmer closed 1 year ago

Bartik-ing-programmer commented 2 years ago

I have the same problem

I have tried to solve with the suggestions that they show in that issue, and none of them gives me the solution.

I am currently working on an app that integrates React and Electron with Javascript

image


index.html

image

I have this error in the execution the script in index.html

Blocked script execution in 'data:text/html' ...(path index.html)...
because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
teknosains commented 1 year ago

I have same issue here, look likes the @digitalpersona modules incluse WebSdk but its not there. in the tutorial, WebSdkl should be loading as a reguler JS modules, not a nodejs module...well its frustating

a-bronx commented 1 year ago

Hello!

Are you trying to load the library into NodeJS like a regular node module? It won't work, both the library and WebSdk are browser-only and must be loaded into a browser, together.

Also note, we do not guarantee the library working in Electron, never tested it. To works with native drivers of fingerprint readers the library uses a connection from a browser context to the loopback (localhost) endpoint provided by the DigitalPersona Lite client. Electron may or may not block this.

The blocked script execution is a probably a CORS issue due to violation of a same-origin policy, not a library issue.

fayizqureshii commented 11 months ago

Hey, @Bartik-ing-programmer . Do you figure this out with react?