I've written my first Blazor app using the server-side rendering with SignalR.
I'm having trouble with authentication.
There is a function that performs a database query. If it returns true, the user is allowed to access the app. If it returns false, the user is to be directed to an org logon page.
I've read about some of the classes and components used to implement authentication, such as AuthorizationStateProvider and AuthorizedView, but I'm not clear on how I'm supposed to use them for this simple situation.
It's really very simple.
bool isAuthenticated = Helper.IsUserLoggedIn();if (!isAuthenticated){ // redirect user to logon page}I know that I can invoke Helper.IsUserLoggedIn, I just want to know the usual best practice for setting this up properly with the framework; I might add additional functionality later.