android - cakephp 3.x - $this->Auth->identify() isn't work(return false), while I trying from mobile application -


i've done user login web. it's working good. but, i'm using same method login mobile applications[android, ios].

request :

array (     [users] => array         (             [username] => username             [password] => password         )  )  $this->auth->identify(); 

but it's return false mobile applications.

i've solved problem given way.

$this->loadcomponent('auth', [ 'authenticate' => [ 'form' => [ 'fields' => [ 'username' => 'username', 'password'=> 'password' ] ] ] ]);

these code given initialize() method of appcontroller.php file


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -