Answer the question
In order to leave comments, you need to log in
Why does Laravel 4 create a new session on every request from a third party site?
I have an API written in Laravel 4 for an Android application in AngularJS.
The bottom line is that when I send an authorization request from the application to the API server, it gives out information that I have entered the profile, but the next time I request information about the user, it gives information that I am not authorized, in fact, it constantly resets session with every request to the server.
This happens only in the application, but when I tested on the local server, everything worked fine and saved the session until I logged out of the profile.
I was told that the problem is in the sessions, but I have already tried everything I could find.
Actually, how to solve this problem, or can someone tell me what, or how to write an API for an application?
Answer the question
In order to leave comments, you need to log in
When a user is authorized on the server, it is necessary to prepare a token and pass it to the application. When requested, the application slips the token either into the headers or into the body of the request. This is due to the fact that the application does not know how to maintain a session like a browser.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question