【发布时间】:2013-12-23 12:55:27
【问题描述】:
我想创建一个自定义 CMS,其中管理员可以在其管理面板中选择所有可能的登录选项。但我只能在我的 Startup.cs 中为 OWIN 设置第三方登录:
public partial class Startup
{
public void ConfigureAuth(IAppBuilder app)
{
// Enable the application to use a cookie to store information for the signed in user
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login")
});
// Use a cookie to temporarily store information about a user logging in with a third party login provider
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
// Uncomment the following lines to enable logging in with third party login providers
app.UseMicrosoftAccountAuthentication(
clientId: "00000000000000000",
clientSecret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
app.UseTwitterAuthentication(
consumerKey: "xxxxxxxxxxxxxxxxxxxxxx",
consumerSecret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
app.UseFacebookAuthentication(
appId: "000000000000000",
appSecret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
app.UseGoogleAuthentication();
}
}
我想从我正在运行的应用程序中启用和禁用这些登录选项。这样启动后。这可能吗?如果可以,怎么做?
【问题讨论】:
-
您找到解决方案了吗?
-
@WilliamEdmondson 不抱歉
标签: c# asp.net-mvc openid asp.net-mvc-5 owin