I'm currently developing a Chrome Extension that relies on Parse User sessions. Because localstorage is limited to specific domains, I am looking to utilize chrome.storage so the data can be accessed across any site.
The existing Parse Javascript SDK uses localstorage for storing user objects and creating sessions. How can I modify this behavior to switch to using chrome.storage instead?
Here is my current approach:
on login
store session token in chrome.storage
Then, during site visits:
if chrome.storage.sessiontoken
create Parse session with the stored session token from chrome.storage
I'm trying to find a simpler solution, so if anyone has any suggestions, I'd appreciate it!
I wish I could just do: window.localstorage = chrome.storage
But I suspect that may cause issues. Has anyone found a way around this problem?