@aws/cloudfront-hosting-toolkit
Version:
CloudFront Hosting Toolkit offers the convenience of a managed frontend hosting service while retaining full control over the hosting and deployment infrastructure to make it your own.
9 lines (8 loc) • 351 B
JavaScript
import { promises as fsPromises } from "fs";
import { getSSOTokenFilepath } from "./getSSOTokenFilepath";
const { readFile } = fsPromises;
export const getSSOTokenFromFile = async (id) => {
const ssoTokenFilepath = getSSOTokenFilepath(id);
const ssoTokenText = await readFile(ssoTokenFilepath, "utf8");
return JSON.parse(ssoTokenText);
};