I’m trying to create a login API for a long time already and I’m not succeeding.
I’m very frustrated
This is my scenario: I’m converting an app developed in Yii1 to Yii 2.x and in Yii1 my API’s works great, I had a method in my ApiController.php called actionLogin and it was beautiful.
Anyways, now in Yii 2 things got very complicated for me. I’m using https://github.com/trntv/yii2-starter-kit as my advanced application which already has the API implemented under backend > modules > api > v1 anyways, I added my controllers there and I get the results working. So far so good but now I want that only users that is authenticated to be able to call my API and see the results (this API will be used in a android mobile app).
I followed all the tutorials that you can find online but none of them worked for me. I’m sure that I am missing something because there is no way possible that I can’t get this working. I’m really desperate. Please help me.
Does anyone has an instruction step by step of how to do it based on https://github.com/trntv/yii2-starter-kit ?