Help with Cloud Function and pathToMyPrivateKeyFile

cloud

#1

Following the docs at https://docs.realm.io/platform/v/3.x/guides/firebase-authentication-with-realm-cloud.

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…