Last active
December 15, 2015 16:49
-
-
Save galfert/5291757 to your computer and use it in GitHub Desktop.
remoteStorage with Ember.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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