Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Merge pull request #3482 from ngokevin/login
Browse files Browse the repository at this point in the history
sync zamboni and marketplace-content-tools login states (bug 1223514)
  • Loading branch information
ngokevin committed Jan 19, 2016
2 parents 01e96ca + 2913caf commit 9161adb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion media/js/devreg/login.js
Expand Up @@ -215,7 +215,17 @@ define('login', ['notification', 'storage'], function(notification, storage) {
}

function userToken() {
return storage.getItem('user');
var redux = localStorage.getItem('redux');
var reduxToken;
var user;
if (redux) {
redux = JSON.parse(redux);
user = redux.user;
if (user && user.token) {
reduxToken = user.token;
}
}
return reduxToken || storage.getItem('user');
}

init_native_fxa();
Expand Down

0 comments on commit 9161adb

Please sign in to comment.