Created
July 31, 2024 11:56
-
-
Save korakot/98e82ac5aaaf0dc5ad06c64aeebb936c to your computer and use it in GitHub Desktop.
2 ways to pass in Google credentials from Service Account info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let cred = JSON.parse(Deno.env.get("GOOGLE_APPLICATION_CREDENTIALS")); | |
// Big Query Style | |
export let bq = new BigQuery({ projectId, credentials: cred }); | |
// Vertex Style | |
let vertex_ai = new VertexAI({ project: "kora-id", location: "us-central1", | |
googleAuthOptions: { credentials: cred } }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment