簡體   English   中英

ASP.NET Core 2.1 中缺少 AddSignIn 方法

[英]AddSignIn Method Missing In ASP.NET Core 2.1

我創建了一個 ASP.NET Core web 應用程序,我嘗試添加以下代碼來實現身份驗證,但找不到 AddSignIn 方法。

services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
    .AddSignIn("AzureAdB2C", Configuration, // This method is missing
    options => Configuration.Bind("AzureAdB2C", options));

我正在使用 Microsoft.AspNetCore.Authentication.OpenIdConnect package 所以我不確定我在這里缺少什么。

AddSignIn在命名空間Microsoft.Identity.Web中,在同名的 package 中。

你安裝了package嗎? https://www.nuget.org/packages/Microsoft.Identity.Web

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM