This works, but means I need credentials on my local machine, and in Git for CI to work. Meh.
import googleServiceAccountCredentials from '../serviceAccount.json' with { type: 'json' }
const auth = new google.auth.GoogleAuth({
credentials: googleServiceAccountCredentials,
scopes: ['https://www.googleapis.com/auth/wallet_object.issuer'],
});
const client = google.walletobjects({
version: 'v1',
auth: auth
});
I have authorised the Firebase Admin SDK Service Account within Wallet, so it should be allowed to talk to it, but how do I create the Wallet Client object using the current (in emulator and live) Firebase service account?
I can see I can import applicationDefatuls()
to get a Credentials object, but what do I do with it?