[英]ASP.NET Core API Swagger - No webpage was found for the web address: https://localhost:44358
[英]MVC Web API NET CORE 5.0 Google Auth: No webpage was found for the web address: https://localhost:44307/signin-google
剛剛構建了一個全新的 web api,按照這個例子: https<\/a> :\/\/docs.microsoft.com\/en-us\/aspnet\/core\/security\/authentication\/social\/google-logins?view=aspnetcore-5.0 盡我所能理解. 不使用剃須刀頁面或數據庫。 並且必須添加以下內容,因為否則它不會運行:
services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = GoogleDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = GoogleDefaults.AuthenticationScheme;
})
Startup.cs 中缺少它:
app.UseAuthentication();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.