Hi! Interesting plugin!
Tested and works well but not sure about "Wrong code" event.
I only receive:
Error
We're sorry, but an unhandled error occurred. Please see the details below.
Wrong code!
/var/www/html/usi/plugins/vojtasvoboda/codelogin/components/CodeLogin.php line 95
/*
* Find user by password
*/
$users = new UserRepository();
$userToLog = $users->getUserByPassword(array_get($data, 'code'));
if ($userToLog === null) {
$exception = new ValidationException([trans('vojtasvoboda.codelogin::lang.form.wrong_code')]);
throw $exception;
}
/*
* Authenticate user
*/
Do I have to work in "exception" condition? Or this is itegrated in plugin's components?
Hi. This exception is automatically handled by October AJAX framework, so be sure you have `framework` and `framework extras` directive included in your layout. For more see Readme, chapter 1.
Wow, that is strange. There has to be some changes in Ajax framework. I made a fix, can you please test it?
https://github.com/vojtasvoboda/oc-codelogin-plugin/commit/bb8c97e7dd9bdc0fff0b3051b17895bb78100856
Thanks a lot for reporting issue.
Same behaviour:
Edited file with line sent:
/var/www/html/sistemas/plugins/vojtasvoboda/codelogin/components/codelogin/default.htm
When I go to protected Page, it redirects to Login Page
If I put rigth Code, Protected page is shown
If I put a wrong Code, Exeption error Page is shown (attached) :(

Sorry for the long delay. I found the problem and make new version 1.0.5 (now ready at the Market).
I've tested it on fresh CMS installation and everything works well with right login and also with bad one.
Could you please test it? Thank a lot.