jeudi 25 janvier 2018

Single login for mobile and web apps?

Can I use API and Passport for single login system for web app ( MPA ) and mobile native app ?

As for WebControllers guarded by "web" I will store the "access token and refresh token" for any next API requests into a session ( I want to consume the same API that is used by the mobile app) and user info would also be stored into a session ..

As for ApiControllers guarded by "api" it will just return access token to be used by the mobile native app for any next API requests ..

Can this be possible? Is this workflow is right ? and what is CreateFreshApiToken middleware role in here ? Also If you can show me some code example or a reference .. I would appreciate it.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire