Sepehr Estaki
Sepehr Estaki

Reputation: 351

Blazor WASM cross domain local storage

As we know, the solution for sharing local storage between different domains is using iframe and postmessage, I've used this in blazor server and it works, but in blazor web assembly, the function in iframe which get the item from localstorage, read the localstorage from the parent not from the iframe source domain and so returns null, is there any solution to fix this?

Upvotes: 0

Views: 354

Answers (1)

Sepehr Estaki
Sepehr Estaki

Reputation: 351

As I create an issue in .net core github, finally I found the answer: the problem is in the debug mode and the browser which blazor open, If I open the website in an independent browser, problem solved!

https://github.com/dotnet/aspnetcore/issues/44587

Upvotes: 0

Related Questions