Skip to content

Instantly share code, notes, and snippets.

@galfert
Last active December 15, 2015 16:49
Show Gist options
  • Save galfert/5291757 to your computer and use it in GitHub Desktop.
Save galfert/5291757 to your computer and use it in GitHub Desktop.
remoteStorage with Ember.js
// tell the app to not start the router right away when there is an access_token param
if (window.location.hash.match(/#access_token=.+/)) {
App.deferReadiness();
}
remoteStorage.claimAccess({ tasks: 'rw' }).then(function() {
remoteStorage.on('ready', function() {
// now we can start the router
App.advanceReadiness();
});
remoteStorage.displayWidget('rs-widget', { redirectUri: window.location.href });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment