@User.Identity.Name mac 为空

@User.Identity.Name empty on mac

我以前使用过Windows身份验证,我真的很喜欢它,因为用户什么都不用做,他们已经登录了。但是现在我正在使用.Net Core 我在 mac。所以我 运行 以下内容:

dotnet new webapp --auth Windows

我根本没有更改任何代码,但我确实安装了依赖项。然后我 运行 应用程序,我看到它说 "Hello, !" 显然 @User.Identity.Name 是空的。还有什么我应该做的吗?

我正在使用:.NET 命令行工具 (2.2.300)。

Windows Mac 和 Linux 上的身份验证将在 ASP.NET Core 3.0 发布后得到支持。你可以阅读它 here.

当然,现在也可以使用preview release