inputlogic / django-api-starter

Boilerplate for starting Django DRF / API projects
2 stars 0 forks source link

Missing Pieces for Sending Firebase Push Notifications #69

Closed eweisner1973 closed 3 years ago

eweisner1973 commented 4 years ago

Need pip install firebase-admin and add resulting dependencies to requirements.txt.

Need to generate new private key in Firebase Admin SDK and download to root of Django project. Then add to apps/firebase/libs.py. For example: cred = credentials.Certificate("app-5d9x5-firebase-adminsdk-8zaqr-e510f0c67f.json")

Note, not sure about storing these credentials in a json file with the project as far as security.

Lastly, in /apps/firebase/tasks.py->send_notification, add from .libs import firebase_instance

weslord commented 4 years ago

Also might want to verify and update the example code in the README.md