Answer the question
In order to leave comments, you need to log in
Laravel rest api user registration and authorization, do I need built-in tools?
Hello. I am making a RESTful API on Laravel, it already has Eloquent, and REST tools, which is very convenient. In fact, I need the following functionality from the API server
The client part of the site makes a request to its server -> the server makes a request to api -> api server adds data to the database / retrieves data from the database and returns a response in JSON format -> server something with does this data. That is an API for internal use.
Answer the question
In order to leave comments, you need to log in
1. This is up to you to decide, but is usually required. Or maybe the application and the server work with each other over a closed channel, in the internal network, then it is not necessary. In any case, the question is not for us.
2. No. The API, of course, can be done in sessions, but they beat their hands for this. OAuth2 is suitable for authentication / authorization during client-server, server-server interaction, Laravel has a ready-made package - Passport .
3. Yes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question