I have a Firebase project in which users have authenticated with Google Sign In
method. They also did grant me access to the ...auth/content
scope.
Now, I'd like to perform some actions on their behalf in my backend code via Google Cloud Library.
I don't know how to properly initialize google client to make it authorized to perform certain actions.
import { google } from "googleapis";
const authUser = await adminApp.auth().getUser(`...`)
const googleAuth = new google.auth.GoogleAuth({
// ???? How can I init it with `authUser`?
})
// Acquire an auth client, and bind it to all future calls
const googleClient = await googleAuth.getClient()
google.options({ auth: googleClient });
Is there any way to use Firebase Auth with Google Cloud node.js lib?