Ionic with loopback: passport and data synchronization

Hi there! I’m developing an Ionic app that saves data to a mysql server and I have been successfully using loopback to accomplish this - however - I’ve been unable to find a simple solution for when the server is down or the device is not connected to the internet to sync the data at the next available time. Furthermore, I’m not sure of the easiest way to integrate Facebook login - I’ve been trying passport but have been so far unable to figure out how to manage a callback operation similar to this post here:

I feel quite overwhelmed with this and would be willing to hire someone for their help - Any advice or interest would be greatly appreciated.

Many thanks,
- Chris