.netコアでGoogle認証を使用していますが、googleからリダイレクトすると例外が表示されます - InvalidOperationException:スキームを処理する認証ハンドラがありません:私はGoogle認証例外 - スキームを処理する認証ハンドラが設定されていません:Cookies
間違っているところクッキーはここがstartup.cs
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
LoginPath = new PathString("/account/login"),
AuthenticationScheme = "MyCookieMiddlewareInstance",
AutomaticAuthenticate = true,
AutomaticChallenge = true,
AccessDeniedPath = new PathString("/Home/AccessDenied"),
});
app.UseGoogleAuthentication(new GoogleOptions
{
AuthenticationScheme = "Google",
DisplayName = "Google",
SignInScheme = "Cookies",
ClientId = "ClientId ",
ClientSecret = "ClientSecret ",
Scope = { "email", "openid" },
CallbackPath = "/home",
});
のための私の設定である私を提案してください。
AddCookieAuthenticationはIServiceCollectionオブジェクトのメソッドではありません。この名前空間が参照されていることを確認しましたが、まだこの例外が発生しています。 –
@ NathanTregillus更新を確認してください – Set