MacGapProject / MacGap2

MacGap 2
MIT License
1.2k stars 84 forks source link

Remember passwords? #96

Closed tbrodbeck closed 4 years ago

tbrodbeck commented 4 years ago

I just started fooling around with MacGap. Is there a way to let the MacGap application remember the passwords entered into it? (Just like chrome or safari etc..) That would be awesome!

jeff-h commented 4 years ago

Functionality in MacGap is provided either by a custom coded bridge from native functionality, or via functionality built into webkit (that would also be available in Safari, for example). Unfortunately, in this case there's no existing bridge in MacGap for the Keychain, and you can't (to my knowledge) access the Keychain from Javascript. However, secure storage of data in Javascript seems fairly commonly desired, so some research from that angle will hopefully yield something useful.

Overall, MacGap2 is in an awkward place. It relies on WebView, which is well and truly deprecated and thus abandoned by Apple. They also recently announced that new App Store submissions which use it will be rejected. Their answer is WKWebView, which is a totally different beast — synchronous communication between native and WKWebView Javascript is not officially possible (although I have successfully experimented with a solution to that). However, there are a number of other major shortfalls in WKWebView (eg printing) which preclude me getting excited about a rewrite to leverage it.

tbrodbeck commented 4 years ago

Since I have no background using Javascript at all and my application is not that important (its just a quick shortcut to my companies mail client and in a while we will have a macOS client either way), I decided that do not get into the topic of editing and manipulating websites with Javascript for now. One additional issue would be that I always get a notification telling me that the Webbrowser I use is not supported... But eitherway, thanks for your ideas. And right out of the box I could already build some useful applications! If I dive deeper into this topic I will let you know right here.