unadlib/origin-storage

Why my data saved in origin storage client domain?

floinay opened this issue · 6 comments

Hello, i have code on website: https://yeda-crossdomain-storage.web.app/

const originStorage = new OriginStorage({
  broadcastChanges: true
});

and i have client code:

const client = new OriginStorageClient({
  uri: 'https://yeda-crossdomain-storage.web.app',
  storageOptions: { name: 'yeda_auth' },
});

But all saved data stored on my client domain.
Storage website data always empty.

hi @floinay, I will check this issue.

it may be a cross-domain storage setting issues, I'm testing in the current repo's example without any issues.

any idea what is wrong with my storage?

You should check for cross-domain storage settings, such as this:

image

I checked, yes is third party, but each domain has only self data
image

Domain 1:

image

Domain 2:

image

i just realized that it only works if the domains are open in the browser at the same time