这是在Startup.cs ConfigureServices
我如何配置OAuth提供程序
services.AddAuthentication(options => {
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
})
.AddFacebook(x => {
x.AppId = "xxx";
x.AppSecret = "xxx";
})
.AddTwitter(x => {
x.ConsumerKey = "xxx";
x.ConsumerSecret = "xxx";
})
.AddGoogle(x => {
x.ClientId = "xxx";
x.ClientSecret = "xxx";
})
.AddMicrosoftAccount(x => {
x.ClientId = "xxx";
x.ClientSecret = "xxx";
})
然后,对于某些要求,我需要在控制器操作中更新AppId / AppSecret,我该怎么做?