MatthewLarner / cross-domain-storage

Cross domain localStorage
ISC License
40 stars 17 forks source link

Adding Support for SessionStorage communication #28

Open HinnHabib opened 4 years ago

HinnHabib commented 4 years ago

I wondering if it is possible to add support to set/get/remove data in using SessionStorage? We are planning to use the current library to transfer some information from React application to another Angular application in the same browser. The information we want to share is sensitive and we don't want to share it via the URL.

Any suggestions or comments on wheater we can support SessionStorage?

CsatariGergely commented 4 years ago

@MatthewLarner any comments to this?

MatthewLarner commented 4 years ago

Hi guys, thanks for the suggestion!

My workload has been heavily impacted due to the COVID-19 outbreak, so I apologise for the slow response.

Yep, I think this can work and should be easy to implement.

Maybe the simplest way is adding some session specific methods:

getSession
setSession
removeSession

I'll try and look at this in the next few days in between everything else.

Also hoping to get some proper testing done on this very soon.

HinnHabib commented 4 years ago

Hi @MatthewLarner,

Thanks for your response.

We were doing some research, and here are some of the issues we should take into consideration: According to the official documentation: https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage

Do you have any idea how to overcome these issues?

Thanks, Habib

HinnHabib commented 4 years ago

@MatthewLarner Was you able to check?

CsatariGergely commented 4 years ago

@MatthewLarner any updates on this?