Skip to content

Instantly share code, notes, and snippets.

View orgsofthq's full-sized avatar

Organic Software orgsofthq

View GitHub Profile
@orgsofthq
orgsofthq / gauth.ts
Last active January 14, 2022 05:42
import { create, Header, Payload } from "https://deno.land/x/[email protected]/mod.ts";
// License: MIT
// How to get an access token from Google Cloud using Deno
//
// Usage:
// const token = await getAccessToken(config)
type Config = {
privateKey: string; // Private base64 encoded RSA key, starts with -----BEGIN PRIVATE KEY-----