Keeping GPLUS_TOKEN_KEY in localStorage forever.

This commit is contained in:
Nick Winter 2015-04-18 19:41:34 -07:00
parent a62288045f
commit ea54c4a8e3

View file

@ -19,7 +19,7 @@ scope = 'https://www.googleapis.com/auth/plus.login email'
module.exports = GPlusHandler = class GPlusHandler extends CocoClass module.exports = GPlusHandler = class GPlusHandler extends CocoClass
constructor: -> constructor: ->
@accessToken = storage.load GPLUS_TOKEN_KEY @accessToken = storage.load GPLUS_TOKEN_KEY, false
super() super()
subscriptions: subscriptions:
@ -53,7 +53,7 @@ module.exports = GPlusHandler = class GPlusHandler extends CocoClass
try try
# Without removing this, we sometimes get a cross-domain error # Without removing this, we sometimes get a cross-domain error
d = _.omit(e, 'g-oauth-window') d = _.omit(e, 'g-oauth-window')
storage.save(GPLUS_TOKEN_KEY, d) storage.save(GPLUS_TOKEN_KEY, d, 0)
catch e catch e
console.error 'Unable to save G+ token key', e console.error 'Unable to save G+ token key', e
@accessToken = e @accessToken = e