Help with Cloud Function and pathToMyPrivateKeyFile



Following the docs at

const functions = require(“firebase-functions”);
const jwt = require(‘jsonwebtoken’);
const fs = require(‘fs’);
const key = fs.readFileSync(’pathToMyPrivateKeyFile’);
exports.myAuthFunction = functions.https.onCall((data, context) => {
const uid = context.auth.uid,
const payload = { userId: uid },
const token = jwt.sign(payload, { key: key, passphrase: “your-passphrase” }, { algorithm: ‘RS256’}),
return { token:token }

I’m looking for documentation around ‘pathToMyPrivateKeyFile’. I’ve generated the public/private keys, enabled JWT for my project on the Realm Platform Dashboard, but could use some guidance with the private key path and getting the private key on my project instance server…