L
L
LiptonOlolo2022-02-14 18:03:19
C++ / C#
LiptonOlolo, 2022-02-14 18:03:19

Blazor Server authorization through Blazor pages, is it possible?

Good day.
The question is, is it possible to implement authorization through Blazor pages? Without the use of controllers, pre-created authorization pages from T-shirts and other things?
Tried with singInManager - got System.InvalidOperationException: "Headers are read-only, response has already started."
Tried through IHostEnvironmentAuthenticationStateProvider and ClaimsPrincipal principal = await SignInManager.CreateUserPrincipalAsync(user); but the session crashes even when you just reload the page.
It is important to make authorization on Blazor.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question