Hiranya Jayathilaka
1 min readJun 8, 2019

--

It’s almost never a good idea store the service account json file alongside code. Note that my example does not use a service account JSON at all. The service account json is only used for local testing, and never gets deployed. You should use application default credentials, like shown in the example.

firebase_admin.initialize_app(options={    
'databaseURL': 'https://<DB_NAME>.firebaseio.com',
})

--

--

Hiranya Jayathilaka

Software engineer at Shortwave. Ex-Googler. PhD in CS. Enjoys working on cloud, mobile and programming languages. Fan of all things tech and open source.