I had created Restful api now i want to create authenticate component can anyone help me out how can i check authentication by username or email and password
rest api auth cakephp 3
I had created Restful api now i want to create authenticate component can anyone help me out how can i check authentication by username or email and password
rest api auth cakephp 3
Hi,
You can use JWT for your authentication process.
Personnaly, i use this one :
But i modified the library for my personal projects, with middleware and a custom unauthorized exception. Because the cakephp-jwt-auth can’t coexist with “Form Authenticate” from CakePHP native core.
Regards
@cyberbobjr do you have a project on Github?
I had made my cakephp rest using ADmad/cakephp-jwt-auth but as you say can’t coexist with “Form Authenticate”.
In Postman for example is working but when I try to use the API in an android app is not working. It is giving me [Cake\Network\Exception\UnauthorizedException] You are not authorized to access that location.
I need help please
@larissa Are you sure the app is sending the same request as Postman, have you checked the headers?
This example made for me work fine: