Answer the question
In order to leave comments, you need to log in
How to use laravel passport for restfull api?
There is a platform on laravel 5.4
Web version uses standard authorization
Now you need to add api for mobile applications
I read about laravel passport, but I can’t figure out how to use it
Let’s say I have a post route in routes/api.php like /auth/login
I want to pass when authorization login and password, and in response to receive two tokens (long-term and short-term)
And already work with them, and in controllers refer to the middleware for api
I read the documentation, but since English is not very good, I could not understand something
Please explain how do it right. I'm not asking you to do it for me.
Answer the question
In order to leave comments, you need to log in
Somehow I translated for myself according to access rights in passport https://docs.google.com/document/d/1Agg8WbiAKP8vfm...
The technical side of the documentation is described quite well.
The main thing will be determined whether only your application or other third-party ones will have access.
for api it is better to use JWT https://github.com/tymondesigns/jwt-auth
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question