Not storing everything in localstorage

This commit is contained in:
James Barnsley
2016-10-18 08:56:53 +13:00
parent 6a07ebc8f6
commit 82b13707f9
7 changed files with 63 additions and 9 deletions

View File

@ -80,6 +80,11 @@ const SpotifyMiddleware = (function(){
console.log('Spotify wants to DISconnect')
break;
case 'SPOTIFY_COMPLETE_AUTHORIZATION':
next(action);
localStorage.setItem('spotify', JSON.stringify({ access_token: action.data.access_token, refresh_token: action.data.refresh_token }));
break;
// This action is irrelevant to us, pass it on to the next middleware
default:
return next(action);