Skip to content

Commit ce4d56f

Browse files
committed
TTL for token
1 parent 057a13d commit ce4d56f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aor-loopback",
3-
"version": "1.1.3",
3+
"version": "1.2.0",
44
"description": "Loopback-style REST Client for Admin-on-rest, the frontend framework for building admin applications on top of REST services",
55
"main": "lib/index.js",
66
"scripts": {

src/storage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default {
99
},
1010
load : function(key){
1111
if (typeof (Storage) == "undefined") { return false; }
12-
var record = localStorage.getItem(key);
12+
var record = JSON.parse(localStorage.getItem(key));
1313
if (!record){return false;}
1414
return (new Date().getTime() < record.timestamp && record.value);
1515
},

0 commit comments

Comments
 (0)