I am dabbling with a .NET 8 Blazor Web App, but have run into a strange issue: I am logging in to my site, and creating a JWT.
However, when I visit the only secure page in the project, the cookie (authToken
) is not there? I can navigate to other sites, back and forth, and the cookie is present. But as soon as I hit that page (secure/dashboard), it is just gone? I have attached a few screenshots, plus the code of that specific page (it's basically empty).
Here is the page code for Dashboard.razor
:
@using MyProject.Client.Layout
@using Microsoft.AspNetCore.Authorization
@page "/secure/dashboard"
@attribute [Authorize]
@layout AdminLayout
<PageTitle>Dashboard</PageTitle>
INSIDE SECURE DASHBOARD
@code {
}
Has anyone come across this before? I am at my wits end.