public function verify(UserConfig $user, AreaContract $area, Provider $provider, $secretKey = null)
    {
        return $this->formFactory->of('antares.two_factor_auth.provider.auth.verify', function (FormGrid $form) use ($user, $area, $provider, $secretKey) {
                    $form->simple(handles('two_factor_auth.post.verify', compact('area')));
                    $form->name('Two-Factor Authentication User Verification Form');
                    $form->layout('antares/two_factor_auth::admin.auth.partials._form');

                    $form->hidden('provider_id', function ($field) use ($provider) {
                        $field->value = $provider->getId();
                    });
                    $form->hidden('user_id', function ($field) use ($user) {
                        $field->value = $user->getId();
                    });
                    $form->hidden('secret_key', function ($field) use ($secretKey) {
                        $field->value = $secretKey;
                    });

                    $title = trans('antares/two_factor_auth::auth.verify');

                    $form->fieldset($title, function (Fieldset $fieldset) use ($user, $provider) {
                        $provider->getProviderGateway()->setupVerifyFormFieldset($fieldset, $user);

                        $fieldset->control('button', 'button')
                                ->attributes(['type' => 'submit', 'class' => 'btn btn-primary'])
                                ->value(trans('Submit & Save'));
                        if (!$user->configured) {
                            $fieldset->control('button', 'cancel')
                                    ->field(function() {
                                        return app('html')->link(handles('two_factor_auth.get.configuration', ['area' => area()]), trans('Go Back'), ['class' => 'btn btn--md btn--default mdl-button mdl-js-button']);
                                    });
                        }
                    });
                });
    }
public function verify(UserConfig $user, AreaContract $area, Provider $provider, $secretKey = null)
    {
        return $this->formFactory->of('antares.two_factor_auth.provider.auth.verify', function (FormGrid $form) use ($user, $area, $provider, $secretKey) {
                    $form->simple(handles('two_factor_auth.post.verify', compact('area')));
                    $form->name('Two-Factor Authentication User Verification Form');
                    $form->layout('antares/two_factor_auth::admin.auth.partials._form');

                    $form->hidden('provider_id', function ($field) use ($provider) {
                        $field->value = $provider->getId();
                    });
                    $form->hidden('user_id', function ($field) use ($user) {
                        $field->value = $user->getId();
                    });
                    $form->hidden('secret_key', function ($field) use ($secretKey) {
                        $field->value = $secretKey;
                    });

                    $title = trans('antares/two_factor_auth::auth.verify');

                    $form->fieldset($title, function (Fieldset $fieldset) use ($user, $provider) {
                        $provider->getProviderGateway()->setupVerifyFormFieldset($fieldset, $user);

                        $fieldset->control('button', 'button')
                                ->attributes(['type' => 'submit', 'class' => 'btn btn-primary'])
                                ->value(trans('Submit & Save'));
                        if (!$user->configured) {
                            $fieldset->control('button', 'cancel')
                                    ->field(function() {
                                        return app('html')->link(handles('two_factor_auth.get.configuration', ['area' => area()]), trans('Go Back'), ['class' => 'btn btn--md btn--default mdl-button mdl-js-button']);
                                    });
                        }
                    });
                });
    }
public function verify ( UserConfig $ user , AreaContract $ area , Provider $ provider , $ secretKey = null ) { return $ this -> formFactory -> of ( 'antares.two_factor_auth.provider.auth.verify' , function ( FormGrid $ form ) use ( $ user , $ area , $ provider , $ secretKey ) { $ form -> simple ( handles ( 'two_factor_auth.post.verify' , compact ( 'area' ) ) ) ; $ form -> name ( 'Two-Factor Authentication User Verification Form' ) ; $ form -> layout ( 'antares/two_factor_auth::admin.auth.partials._form' ) ; $ form -> hidden ( 'provider_id' , function ( $ field ) use ( $ provider ) { $ field -> value = $ provider -> getId ( ) ; } ) ; $ form -> hidden ( 'user_id' , function ( $ field ) use ( $ user ) { $ field -> value = $ user -> getId ( ) ; } ) ; $ form -> hidden ( 'secret_key' , function ( $ field ) use ( $ secretKey ) { $ field -> value = $ secretKey ; } ) ; $ title = trans ( 'antares/two_factor_auth::auth.verify' ) ; $ form -> fieldset ( $ title , function ( Fieldset $ fieldset ) use ( $ user , $ provider ) { $ provider -> getProviderGateway ( ) -> setupVerifyFormFieldset ( $ fieldset , $ user ) ; $ fieldset -> control ( 'button' , 'button' ) -> attributes ( [ 'type' => 'submit' , 'class' => 'btn btn-primary' ] ) -> value ( trans ( 'Submit & Save' ) ) ; if ( ! $ user -> configured ) { $ fieldset -> control ( 'button' , 'cancel' ) -> field ( function ( ) { return app ( 'html' ) -> link ( handles ( 'two_factor_auth.get.configuration' , [ 'area' => area ( ) ] ) , trans ( 'Go Back' ) , [ 'class' => 'btn btn--md btn--default mdl-button mdl-js-button' ] ) ; } ) ; } } ) ; } ) ; }
Returns a form for a Two-Factor Auth login page.

@param UserConfig $user
@param AreaContract $area
@param Provider $provider
@param String $secretKey
@return \Antares\Contracts\Html\Builder
Returns a form for a Two - Factor Auth login page .