mozilla/spartacus — pull request #145 by mstriemer (2014-10-17 02:59:26+00:00)
Title: Save JWT in localStorage for FxA auth (bug 1082165)

https://bugzilla.mozilla.org/show_bug.cgi?id=1082165

Achievement unlocked: break 10% of the tests in one commit.

This is the best I could come up with. I tried a few different places to set/get from storage and I think this makes the most sense. It breaks a bunch of tests and I don't know why. They fail individually so it doesn't seem like a `localStorage` persisting across tests issue. I added the `try`/`catch` blocks in hopes of not breaking the tests but they're still broken. I left them in anyway.

/cc @muffinresearch @andymckay