最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

blazor - JWT not present on certain page only? - Stack Overflow

programmeradmin2浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论