async setAuth(auth) {
    clearTimeout(this.tokenRenewalId_);

    if (typeof auth === 'string') {
      this.token_ = auth;
      this.fireWhenReady_();
      return;
    }

    /**
     * @type {string}
     */
    let token;

    /**
     * @type {AccessTokenClaims}
     */
    let claims;

    try {
      token = await getToken(auth);
      claims = parseTokenClaims(token);
    } catch (error) {
      this.error_ = error;
      this.setState('error');
      return;
    }
    this.token_ = token;

    const expiry = claims.exp * 1000;
    const timeout = Math.max(expiry - Date.now() - 60 * 1000, 1);
    this.tokenRenewalId_ = setTimeout(() => this.setAuth(auth), timeout);
    this.fireWhenReady_();
  }
Set the authentication configuration for the source (if not provided in the constructor).
If an object with `clientId` and `clientSecret` is provided, an access token will be fetched
and used with processing requests.  Alternatively, an access token can be supplied directly.

@param {AuthConfig|string} auth The auth config or access token.
@api