Authentication login without password hasher error

Guys, Please I need your help

I have a login page that includes nis and password as verification data.
this is my data in my database

I want to create a login page without using a password hasher

And this is my code

    public function initialize(): void
            $this->loadComponent('Auth', [
                'authenticate' => [
                    'Form' => [
                        'fields' => [
                            'nis' => 'nis',
                            'password' => 'password'
                'loginAction' => [
                    'controller' => 'Users',
                    'action' => 'login'
                'unauthorizedRedirect' => $this->referer()


public function login(){
        // $this->autoRender = false;
        if ($this->request->is('post')) {
            # code...
            $user = $this->Auth->identify();
            if ($user) {
                # code...
                return $this->redirect($this->Auth->redirectUrl());
           $this->Flash->error('Your username or password is Incorrect');


<?= $this->Form->create(null, ['style' => 'padding:20px'])?>
<?= $this->Form->control('nis', ['style' => 'opacity: 0.85'])?>
<?= $this->Form->control('password', ['style' => 'opacity: 0.85'])?>
<?= $this->Form->button('LOGIN', ['class' => 'btn btn-block btn-instagram btn-flat', 'style' => 'height:50px;opacity: 0.85;'])?>
<?= $this->Form->end()?>

when I debug the login function in UsersController
it showing false
APP/Controller\UsersController.php (line 131)

Anyone can help me
thank you

I think you shouldn’t use ‘nis’ key, but ‘username’
it ask database using username, according to docs.

fields: The fields to use to identify a user by. You can use keys username and password to specify your username and password fields respectively.

In the fields definition, it should be 'username' => 'nis', not 'nis' => 'nis'. That’s how you tell it that you want to use nis as the “username” field.