© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
6 replies
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.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

WebAPI authentication with Blazor WASM
C#CC# / help
8mo ago
Blazor WASM Authentication
C#CC# / help
2y ago
Authentication Flow Blazor
C#CC# / help
4y ago
Blazor WASM Authentication with separate APIs
C#CC# / help
4y ago