mardi 27 mars 2018

Simple mobile app to Laravel API authentication with Passport

Laravel 5.6

I need to create a way for the mobile app users to be able to register an account in a Laravel based app and then log in and gain access to the API.

All user data and credentials will be stored in Laravel App. The mobile app will have to be authorised as long as the user doesn't log themselves out manually.

I read about the Resource owner credentials grant and it seems like the only way to use username/password to receive the token. The problem here is that client_secret has to be stored or generated on an mobile app. (?)

Some people use Implicit grant for mobile app but in my case I need to pass username and password and this method does not seem to offer that.

What is the simplest, "best practice" way of implementing this basic functionality using Passport?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire