Function ensureAuthenticatedStorefront

  • Ensure that we have a valid session to access the Storefront API.

    Parameters

    • scopes: "devtools"[] = []

      Optional array of extra scopes to authenticate with.

    • password: undefined | string = undefined

      Optional password to use.

    • forceRefresh: boolean = false

      Optional flag to force a refresh of the token.

    Returns Promise<string>

    The access token for the Storefront API.