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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -