I have to implement end-to-end encryption with firebase push notifications on React and React Native Apps.
What I have in mind
- Encrypt messages from the backend and sent them to firebase
- On the front end, we will decrypt the message with the shared private key that we got on login from the backend or a predefined key on the app itself
My Question is. Since push notifications run in the background.
- How do we get a private key for decryption when a notification cames
- How do we decrypt the message using library (crypto-js) on push notification
I know this is not a way to do this. Please suggest a better option. This is for HIPPA compliance