authWrap = ({
  title,
  alerts,
  form,
  afterForm,
  headers,
  csrfToken,
  authLinks,
  bodyClass,
  req,
}) =>
  wrapIt(
    headers,
    title,
    `class="bg-gradient-primary ${bodyClass || ""}"`,
    `<div class="container">
      <div class="row justify-content-center">
        <div class="col-xl-10 col-lg-12 col-md-9">
          <div class="card o-hidden border-0 shadow-lg my-5">
            <div class="card-body p-2">
              <div class="row">
                <div class="col">
                  <div class="p-5">
                  <div id="alerts-area">${/* deprecated */ ""}</div>
                    <div class="text-center">
                      <h1 class="h4 text-gray-900 mb-4">${title}</h1>
                    </div>
                    ${renderForm(formModify(form), csrfToken)}
                    ${renderAuthLinks(authLinks, req)}
                    ${afterForm ? afterForm : ""}
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div 
        id="toasts-area"
        class="toast-container position-fixed p-2 top-0 ${
          isNode() ? "end-0" : "start-50"
        }
        style: "z-index: 9999;"
        aria-live="polite" 
        aria-atomic="true"
      >
        ${alerts.map((a) => toast(a.type, a.msg)).join("")}
      </div>
    </div>`
  )
@param {object} opts
@param {string} opts.title
@param {object[]} opts.alerts
@param {object} opts.form
@param {string} opts.afterForm
@param {*} opts.headers
@param {string} opts.csrfToken
@param {object} opts.authLinks
@returns {string}