code: func (a *Authenticator) CheckLoginRequired() error {
  	a.lock.Lock()
  	defer a.lock.Unlock()
  
  	if err := a.ensureInitialized(); err != nil {
  		return err
  	}
  
  	// No cached base token and the token provider requires interaction with the
  	// user: need to login. Only non-interactive token providers are allowed to
  	// mint tokens on the fly, see refreshToken.
  	if a.baseToken.token == nil && a.baseToken.provider.RequiresInteraction() {
  		return ErrLoginRequired
  	}
  
  	return nil
  }
docs: // CheckLoginRequired decides whether an interactive login is required.
  //
  // It examines the token cache and the configured authentication method to
  // figure out whether we can attempt to grab an access token without involving
  // the user interaction.
  //
  // Note: it does not check that the cached refresh token is still valid (i.e.
  // not revoked). A revoked token will result in ErrLoginRequired error on a
  // first attempt to use it.
  //
  // Returns:
  //   * nil if we have a valid cached token or can mint one on the fly.
  //   * ErrLoginRequired if we have no cached token and need to bother the user.
  //   * ErrInsufficientAccess if the configured auth method can't mint the token
  //     we require (e.g when using GCE method and the instance doesn't have all
  //     requested OAuth scopes).
  //   * Generic error on other unexpected errors.