getOnce(key, req, res) {
    if (!req[COOKIES]) {
      return undefined;
    }

    const { secure, sameSite } = this.sessionCookieConfig;

    let value = getCookieValue(key, req[COOKIES][key], this.keyStore);
    this.deleteCookie(key, res, { secure, sameSite });

    if (this.legacySameSiteCookie) {
      const fallbackKey = `_${key}`;
      if (!value) {
        value = getCookieValue(
          fallbackKey,
          req[COOKIES][fallbackKey],
          this.keyStore
        );
      }
      this.deleteCookie(fallbackKey, res);
    }

    return value;
  }
Get a cookie value then delete it.

@param {String} key Cookie name to use.
@param {Object} req Express Request object.
@param {Object} res Express Response object.

@return {String|undefined} Cookie value or undefined if cookie was not found.