code: func (t *tokenWithProvider) renewToken(ctx context.Context, prev, base *internal.Token) (*internal.Token, error) {
  	if prev == nil {
  		if t.provider.RequiresInteraction() {
  			return nil, ErrLoginRequired
  		}
  		logging.Debugf(ctx, "Minting a new token")
  		tok, err := t.mintTokenWithRetries(ctx, base)
  		if err != nil {
  			logging.Warningf(ctx, "Failed to mint a token: %s", err)
  			return nil, err
  		}
  		return tok, nil
  	}
  
  	logging.Debugf(ctx, "Refreshing the token")
  	tok, err := t.refreshTokenWithRetries(ctx, prev, base)
  	if err != nil {
  		logging.Warningf(ctx, "Failed to refresh the token: %s", err)
  		return nil, err
  	}
  	return tok, nil
  }
docs: // renewToken is called to mint a new token or update existing one.
  //
  // It is called from non-interactive 'refreshToken' method, and thus it can't
  // use interactive login flow.