<?php

namespace App\Actions\Fortify;

use App\Support\TurnstileVerifier;
use Closure;

class EnsureTurnstileVerification
{
    /**
     * @param  mixed  $request
     */
    public function handle($request, Closure $next)
    {
        TurnstileVerifier::assertValidFromInput($request->all(), $request->ip());

        return $next($request);
    }
}
