freedomjs / freedom-social-firebase

Firebase Social Provider
0 stars 0 forks source link

Detect disconnect in Firebase social providers #24

Closed dborkan closed 9 years ago

dborkan commented 9 years ago

Detect disconnect in Firebase social providers. This is using Firebase's special .info/connected endpoint, documented at https://www.firebase.com/docs/web/guide/offline-capabilities.html

Also I've changed this.baseRef to be the reference to the top-level Firebase app (e.g. https://popping-heat-4874.firebaseio.com/ for uProxy), and added this.allUsersUrl to be what baseRef_ used to represent (e.g. https://popping-heat-4874.firebaseio.com/facebook-users for uProxy with Facebook)

Fixes https://github.com/freedomjs/freedom-social-firebase/issues/10 and https://github.com/uProxy/uproxy/issues/1392

Tested in Chrome (uProxy automatically reconnects) and Firefox (reconnect not implemented but uProxy successfully detects the disconnect)

agallant commented 9 years ago

Small nit, LGTM besides, particularly like the updateMyClient bit.

lucyhe commented 9 years ago

:+1:

agallant commented 9 years ago

:+1: