Ranking i rrk ne server
prsh kam hy ne server keto javet e fundit dhe duke pa ca bohet po rankoj cunat asigjo personale
What's the standard approach for cookie authentication in Blazor Server?
I'm experimenting with Blazor Server (InteractiveServerMode) for a work project and had a hard time with cookie authentication. We always use authentication through Active Directory since users are logged in a Windows domain, but in this project user has to log in with his username/password. Note that I can't use Identity for this.
I tried experimenting with various LLM solutions yet none of them yielded results with all of them throwing a similar "Headers cannot be modified as request has been initiated". Somehow Blazor was refusing to acknowledge my cookie as Postman successfully returned it.
Ultimately code in this repo achieves cookie auth but it feels so contrived. Author creates two dummy-pages: (PostLogin to load cookie and Logout to delete it) just to accomplish what should have been completely straightforward.
Is there a cleaner way to implement cookie authentication that solves the component mounting problem in InteractiveRenderMode?