# fluent-support/2.2.1/app/Http/Controllers/TwofaController.php

Fluent Support – Helpdesk &amp; Customer Support Ticket System, version 2.2.1. 25 lines.

- Page: https://pluginprobe.com/plugins/fluent-support/2.2.1/code/app/Http/Controllers/TwofaController.php
- Raw: https://pluginprobe.com/plugins/fluent-support/2.2.1/raw/app/Http/Controllers/TwofaController.php
- Modified: 2026-02-09T14:11:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-support/2.2.1/code/app/Http/Controllers/TwofaController.php#L10-L20`.

```php
<?php
namespace FluentSupport\App\Http\Controllers;

use FluentSupport\Framework\Http\Request\Request;
use FluentSupport\App\Hooks\Handlers\TwoFaHandler;



class TwofaController extends Controller
{
    public function verify2fa( Request $request )
    {
        $data['login_passcode'] = $request->getSafe('login_passcode', 'sanitize_text_field', '');
        $data['login_hash'] = $request->getSafe('login_hash', 'sanitize_text_field', '');

        $verify = (new TwoFaHandler)->verify2FaEmailCode($data);
        if(!$verify){
            return $this->response([
                'message' => __('Your provided code is not valid. Please try again', 'fluent-support')
            ], 423);
        }
    }

}

```
