@shopify/cli-kit
    Preparing search index...

    Function ensureAuthenticatedThemes

    • Ensure that we have a valid session to access the Theme API. If a password is provided, that token will be used against Theme Access API. Otherwise, it will ensure that the user is authenticated with the Admin API.

      Theme Access passwords only work with the store's permanent .myshopify.com domain, so when the password is a Theme Access password the returned session uses the permanent domain of store, even if store is another of the store's domains.

      Parameters

      • store: string

        Store fqdn to request auth for.

      • password: string | undefined

        Password generated from Theme Access app.

      • scopes: AdminAPIScope[] = []

        Optional array of extra scopes to authenticate with.

      • options: EnsureAuthenticatedAdditionalOptions = {}

        Optional extra options to use.

      Returns Promise<AdminSession>

      The access token and store.