Replies: 1 comment 5 replies
-
The reason CSLA no longer allows setting the Here's an example of a custom In that example, the provider is calling a server endpoint to get the user principal object on request. How you authenticate the user and where you create that authenticated fwiw, I talk about this in my VS Live Blazor talks and in my online Blazor class. |
Beta Was this translation helpful? Give feedback.
-
I have a Blazor WASM app that I am upgrading CSLA 8. I use AddMsalAuthentication to setup login with Azure AD and AddAccountClaimsPrincipalFactory to set a custom ClaimsPrincipalFactory. In my claims principal factory, I am overrideing the CreateUserAsync method and setting the ApplicationContext as such
This code throws an unsuported exception in when I attempt to upgrade to CSLA 8. If I remove the line that sets the user everything works, but I then lose the user when I navigate from one page (component) to the next.
I assume this somehow relates to this but I don't really understand that discussion and also that was not a WASM app.
What would be the correct way to set the user in a CSLA 8 Blazor WASM app so that I would not lose the identity after the initial login?
For clarity as to what I am doing here is the entire method:
Beta Was this translation helpful? Give feedback.
All reactions