Bug 1059021: Added sign in/up link to the Loop panel footer. Patch by MattN and nperriault. r=MattN,r=Standard8

This commit is contained in:
Matthew Noorenberghe
2014-08-29 14:11:54 +01:00
parent 9bbb35797d
commit 7994528ea7
7 changed files with 97 additions and 44 deletions

View File

@@ -780,6 +780,10 @@ this.MozLoopService = {
* @return {Promise} that resolves when the FxA login flow is complete.
*/
logInToFxA: function() {
if (gFxAOAuthTokenData) {
return Promise.resolve(gFxAOAuthTokenData);
}
return MozLoopServiceInternal.promiseFxAOAuthAuthorization().then(response => {
return MozLoopServiceInternal.promiseFxAOAuthToken(response.code, response.state);
}).then(tokenData => {