abrasive / mygov-totp-enroll

Enroll a real TOTP client to access myGov
100 stars 9 forks source link

Broken on Apple Silicon Macs because Electron 4 wasn't built for darwin-arm64 #12

Closed lachlanhunt closed 1 year ago

lachlanhunt commented 1 year ago

When trying to install dependencies, electron "^4.1.4 " resolves to v4.2.14, and then it fails when trying to download the asset for electron-v4.2.12-darwin-arm64.zip because it doesn't exist.

More recent versions of Electron do have a darwin-arm64 release and can be installed. However, the default value for nodeIntegration changed as of v5 and this needs to be updated as per this Stack Overflow answer https://stackoverflow.com/a/55908510/132537

Edit: Don't set nodeIntegration to true. There are security issues with doing that. There are other solutions explained here https://stackoverflow.com/a/59888788/132537

jamesramsay commented 1 year ago

@lachlanhunt any chance you have a fork with your changes? I'm trying to work this out too, but have zero prior Electron experience. Thanks 🙏

lachlanhunt commented 1 year ago

@jamesramsay I created a PR with the fix for you.

jamesramsay commented 1 year ago

Thanks @lachlanhunt 🙌