public function storeApiKey(string $apiKey) {
		$hash = password_hash($apiKey, PASSWORD_BCRYPT);

		$stmt = $this->db->prepare(
			"INSERT INTO sessions (user_id, login_hash, api_hash) " .
			"VALUES (?, NULL, ?) " .
			"ON DUPLICATE KEY UPDATE api_hash=?;"
		);
		$stmt->bind_param("iss",
			$this->user->id, $hash, $hash);
		$stmt->execute();
		$this->db->commit();
	}