Secure background geolocation request to server


#1

Yesterday I set the background geolocation plugin in an ios app.

So the phone send geolocation data to my server even if the app is closed.

On the server I use sessions to know who is the user and handle requests. But now request come when sessions have been destroyed.

What are solutions to handle these requests and know who is the user ?

Thanks dear ionicers !!


#2

Hi, I’m struggling to get backgroundGeolocation working. Would please be kind and publish your working code here??


#3

So I understanding you dont need to know who the user is?
I guess I did not understanding your question, right?
Please be more specific about your problem.


#4

If the server session is destroyed, I presume it would return an HTTP 401. You should detect that 401 in your Javascript code and execute

bgGeo.stop();

#5

Sir? can you help me with that same issue too? I need to see on my server the user who logged! :slight_smile: Please!? :cry: