Open dazinator opened 5 years ago
Support for this could be added to a Donettency.Spa.Blazor
package.
Similar to CascadingAuthenticationState
component, you could use CascadingTenantState
component. This component would be configured in startup.cs
to obtain current tenant information (generic TTenantInfo) from either:
2 is a stretch goal. Awaiting the cascaded Task<TenantInfo>
in blazor , would cause a request to the server using option 1 if the task hasn't run before. Task is reused so this would only happen once unless invalidated.
See cascading parameter concept in Blazor : https://github.com/dotnet-presentations/blazor-workshop/blob/master/docs/05-authentication-and-authorization.md
Dotnettency could offer a similar cascading parameter to allow access to the current TTenant information retrieved from the server.