-
Notifications
You must be signed in to change notification settings - Fork 144
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
PHP Version
7.4.16
CodeIgniter4 Version
4.2.3
Shield Version
v1.0.0-beta.2
Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
mysqlnd 8.1.1
Did you customize Shield?
No
What happened?
We've wanted to enable 2FA authentication in our application, but after enabling it in Auth.php an error occurs.
Steps to Reproduce
Enable 2FA in Auth.php with this code
public array $actions = [ 'login' => 'CodeIgniter\Shield\Authentication\Actions\Email2FA', 'register' => null, ];
After user login, system is returning error
After some reading of Shield code we've seen that the ActionController actually don't load an auth helper. So that's why Codeigniter is trying to run auth() controller, what we see on the screenshot.
Please update ActionController and change
protected $helpers = ['setting'];
to protected $helpers = ['auth', 'setting'];
Expected Output
Anything else?
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working