Answer the question
In order to leave comments, you need to log in
How to use laravel passport?
How to use laravel passport correctly? I am currently doing this. A route that returns information about the user. On the client, if you need to check the admin or not, I just send a request to this route and look at the role. If the admin is ok, otherwise I throw it out of the application. But I think it's crap. How do they do it right? (REST)
Answer the question
In order to leave comments, you need to log in
I have not worked with the passport yet, but I think that you need to write middlware which will be hung up on the url indicating the roles || groups that have access) further checks during the request (permissions || user group) and if not suitable ... returns 403 ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question