The samples and documentation show that you can create a JWT client using
wtClient = new google.auth.JWT(
...but google.auth is undefined.
samples/directory_v1/group-delete.js
Greetings! Can you share a full code sample? How exactly are you running the sample? You may need to run npm link && npm link googleapis before trying the sample :)
Sorry, this was my fault. I was using const google = require('googleapis'); instead of const { google } = require('googleapis');
When I looked in the code I did not see auth exported in index.js, but it seems to be working regardless.
Most helpful comment
Sorry, this was my fault. I was using
const google = require('googleapis');instead ofconst { google } = require('googleapis');When I looked in the code I did not see
authexported inindex.js, but it seems to be working regardless.