#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# shellcheck source=../lib/common.sh
source "${ROOT}/lib/common.sh"

EMAIL="${EMAIL:-user@example.com}"
PASSWORD="${PASSWORD:-password123}"

: >"${COOKIE_JAR}"
curl_post_json_cookies "/sign-in/email" "$(printf '%s' "{\"email\":\"${EMAIL}\",\"password\":\"${PASSWORD}\"}")" | pretty
