src/includes/classes/Core/Utils/Csrf.php
public function create(callable $callback = null): string
    {
        $_csrf = $this->c::uuidV4();

        if (isset($callback)) {
            $callback($_csrf);
            return $_csrf;
        }
        if ($this->c::isActiveSession()) {
            return $_SESSION['_csrf'] = $_csrf;
        }
        throw $this->c::issue('No storage handler.');
    }
public function create(callable $callback = null): string
    {
        $_csrf = $this->c::uuidV4();

        if (isset($callback)) {
            $callback($_csrf);
            return $_csrf;
        }
        if ($this->c::isActiveSession()) {
            return $_SESSION['_csrf'] = $_csrf;
        }
        throw $this->c::issue('No storage handler.');
    }
CSRF generator.

@since 17xxxx CSRF utils.

@param callable|null $callback Callback.

@return string New, unique CSRF token.
CaSe-insensitive, 32 bytes in length.

@note Callback stores the token for future verification.
If no callback, a `$_SESSION` storage handler is used by default.