C#C
C#3y ago
adc90

❔ Authentication with blazor pre-rendered

I'm doing Authentication in blazor, we're using ProtectedBrowserStorage to store the user object. As such when I render components OnInitializedAsync I don't have access to the user object as it's stored client side. Is it the pattern to just do setup of a component OnAfterRenderAsync or is there a way to have access to the user object in OnInitializedAsync. I was thinking I could keep it in a server cookie but I'm not sure how to go about that.
Was this page helpful?