
[英]How to get the user data on google authentication using JWT bearer authentication?
[英]Using Facebook OAuth authentication along side AuthToken authentication - how to get both to work?
我正在将 Facebook 身份验证添加到现有的 ASP.NET Core 应用程序中。 我可以让任何一个工作,但我不能让两个同时工作。 我错过了什么?
// startup.cs
services.AddAuthentication(options =>
{
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
// If this next line is commented out, Facebook works but AuthToken doesn't.
// If this next line is NOT commented out, Facebook stops working and AuthToken works as original.
options.DefaultAuthenticateScheme = AuthTokenHandler.AuthenticationScheme;
})
.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme)
.AddFacebook(FacebookDefaults.AuthenticationScheme, options =>
{
options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
// other facebook options ...
})
.AddAuthTokenHandler();
如何获得“正常”身份验证请求以路由到 AuthTokenHandler?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.