How to implement End to End encryption on Firebase push notification

468 views Asked by At

I have to implement end-to-end encryption with firebase push notifications on React and React Native Apps.

What I have in mind

  1. Encrypt messages from the backend and sent them to firebase
  2. 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.

  1. How do we get a private key for decryption when a notification cames
  2. 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

0

There are 0 answers