1

I have my parent domain, e.g. https://awesomedomain.com which hosts the landing page for my app and the main app is hosted on https://app.awesomedomain.com .

When I authenticate a user on the subdomain https://app.awesomedomain.com and store the data in local storage I want the parent domain https://awesomedomain.com to be able to have access to the local storage of the subdomain.

Both apps are all on React. How can I achieve this?

Vy Do
  • 46,709
  • 59
  • 215
  • 313
ololo
  • 1,326
  • 2
  • 14
  • 47
  • This won't work due to security restrictions. Each subdomain has its own local-storage-object. You'll have to persist data yourself. Maybe this could be helpful: https://stackoverflow.com/questions/4026479/use-localstorage-across-subdomains – niorad Nov 25 '21 at 08:37
  • Does this answer your question? [use localStorage across subdomains](https://stackoverflow.com/questions/4026479/use-localstorage-across-subdomains) – jsejcksn Nov 25 '21 at 08:37

0 Answers0