Cookie & Blazor Server-side
Kevin Azure
141
Reputation points
Is Cookie supported by Blazor Server-side?
How to use Cookie to store Login/Session information?
[so the duplicate login prompt won't come for N days]
2 answers
Sort by: Most helpful
-
-
Bruce (SqlWork.com) 61,731 Reputation points
2023-05-05T17:26:35.2766667+00:00 Blazor server uses cookie authentication. Just config the identity cookie the way you would for any asp.net core website.
when blazor server needs authentication it redirects to the login, which unloads the app. Then after login redirects back, the app is reloaded. Unless saved, all state values will be lost. You can avoid this by requiring authentication if the hosting page.
note: typically with blazor WASM you would use bearer tokens.