I need to access firebase admin through Firebase functions. I have a function that is being called through an HTTP trigger, and will create custom auth tokens.
In the Firebase admin documentation, they say that you need to refer to the JSON
file containing all the keys (serviceAccount
)
var serviceAccount = require("path/to/serviceAccountKey.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://<databaseName>.firebaseio.com"
})
Since i'm already inside my own Firebase functions, will i need to upload these keys or can I access this in any other way?
It feels very unnecessary uploading all my admin keys to Firebase storage just to mint new tokens...