Electron and Cookies
I’ve no idea if this will ever be useful to me but I just noticed that when I tried to store a Cookie my production-built Electron app would delete the Cookies every time the app was closed.
Is this normal? Are Cookies supposed to be used with Electron? Maybe I’m better off just sticking to LocalStorage??
I’ve been doing a lot of research today on LocalStorage and it seems the way to go for Electron. I don’t think Cookies work the same way with Electron.
By the way, you probably shouldn’t store anything sensitive in LocalStorage, including api tokens. Instead use secure storage packages (untested):
Cordova: https://github.com/Crypho/cordova-plugin-secure-storage (no longer maintained)
For SPAs that utilise APIs I think I need to integrate Implicit Password Grants, instead of Password Grants. SPAs don’t have a secure way to store data.