UNPKG

@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.

12 lines (11 loc) 490 B
import { getSsoOidcClient } from "./getSsoOidcClient"; export const getNewSsoOidcToken = async (ssoToken, ssoRegion) => { const { CreateTokenCommand } = await import("@aws-sdk/client-sso-oidc"); const ssoOidcClient = await getSsoOidcClient(ssoRegion); return ssoOidcClient.send(new CreateTokenCommand({ clientId: ssoToken.clientId, clientSecret: ssoToken.clientSecret, refreshToken: ssoToken.refreshToken, grantType: "refresh_token", })); };