I am trying to have Blazor WASM hosted app with asp.net core Identity. To keep it clear I created a repo where initial commit is pure blazor web app (.NET8) with WASM option + individual accounts. Its working for authorize view without any roles or claims. Second commit is after updating classes and connection string to use roles from existing database (identity).
https://github.com/Laftek/BlazorAppWasmAuth
What happens is that after viewing /weather page with “Admin” role it redirects me to login. After clicking weather link again it shows me weather forecast for few second (so roles authorization works) but then after few seconds it redirects me to login again. I cannot track where is this request coming from and its too difficult to me to investigate whole authorization/authentication process. What do I do wrong?
Thank you.