cryptee / web-client

Cryptee's web client source code for all platforms.
https://crypt.ee
Other
444 stars 22 forks source link

[Feature Request] Email Notifications #94

Closed brendanperry closed 3 years ago

brendanperry commented 3 years ago

Cryptee currently allows for making todo lists. However, since the app is not native (I'm talking mobile), it cannot send push notifications. Getting reminded of things that I need to do is essential for my todo lists.

An email would be a great way to send a notification for something. It would be a great fit for me.

This is currently the main downside in my eyes to a PWA. But for my situation, email notifications would resolve this.

I love Cryptee and appreciate the work that is put into it! I'm looking forward to more updates!

johnozbay commented 3 years ago

Hey Brendan! πŸ‘‹πŸ» I hope you're enjoying the v3 update so far!

So a few fun things to note here – iOS is the only OS that doesn't allow notifications for PWAs, on all other operating systems (incl OSX & Safari) we can actually send notifications. So I'd say it's a shortcoming of iOS specifically and not one of PWAs.

We actually had this idea a while back, and looked deeply into how we can make this happen. Here's the key problem though, and perhaps the reason why it's not possible to accomplish something like this on an on-device encrypted environment like Cryptee :

Since your documents are encrypted on the device, and incomprehensible to our servers, our servers can't figure out if you have overdue tasks in your documents / notes and send you reminders ahead of time. So if you have an outstanding todo item scheduled for next week, Cryptee's servers can't see when it's scheduled to, so it can't send you notifications to remind you.Β 

And if we were to start selectively storing dates / tasks out of to-do lists unencrypted / let servers know etc, that would be a big privacy violation, and could cause tons and tons of issues in the long run.

If you can find a solution to this specific problem – i.e. a workflow where servers don't need to know when you have a task due, but can somehow send you a notification, I promise it'll be the first feature I'll go ahead and add right away!

Hoping this makes sense! Let me know what you think! ✌🏻

brendanperry commented 3 years ago

This makes a lot of sense. Unfortunately, I can't think of any magic to fix this. If you want to close this go ahead!

johnozbay commented 3 years ago

Thanks for this! And please do keep it in the back of your mind, and let me know if you can think of a solution. Would love to add this. i.e. one idea we had is to have an encrypted 'reminders' list, and sync it on each app launch. Then each device would schedule local reminders that get triggered on time. (think like your phone's alarm clock, it's a locally scheduled reminder that doesn't require servers to know etc)

The downside here is if you schedule something on your laptop, you'd likely expect your phone to remind you when it's time, even if you haven't launched the app on your phone to sync the reminders yet. Reason why we couldn't get this to work is because:

a) Operating systems don't allow background cryptographic operations. so we can't encrypt/decrypt anything in the background without launching the app. (presumably because apple/google doesn't want malicious apps to mine for crypto-currencies etc in the background and drain your battery, all without ever launching the app) – for android we found a way to kinda solve this, by sending a background sync request, then use the few seconds of background-operation allowance we have to decrypt the reminders list in the service worker quickly. But our mileage may vary depending on device performance, and it doesn't work on iOS at all.

b) You'd have to save your encryption key, and keep it stored somewhere in an accessible way so that the app can decrypt the reminders list without you having to type the key.

I'll close this for now, but feel free to open it any time! Thanks a lot for this! ✌🏻