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

    Parameters

    • store: string

      Store fqdn to request auth for.

    • password: undefined | string

      Password generated from Theme Access app.

    • scopes: AdminAPIScope[] = []

      Optional array of extra scopes to authenticate with.

    • forceRefresh: boolean = false

      Optional flag to force a refresh of the token.

    Returns Promise<AdminSession>

    The access token and store.