Commit 38a56016 authored by alan.f's avatar alan.f

add-google-login

parent cb4412a6
......@@ -30,7 +30,7 @@ namespace IdentityServer
config.UseSqlServer(connectionString);
//config.UseInMemoryDatabase("Memory");
});
// AddIdentity registers the services
services.AddIdentity<IdentityUser, IdentityRole>(config =>
{
......@@ -55,18 +55,18 @@ namespace IdentityServer
//var certificate = new X509Certificate2(filePath,"Cesc007+");
services.AddIdentityServer()
.AddAspNetIdentity<IdentityUser>()
//.AddConfigurationStore(options =>
//{
// options.ConfigureDbContext = b => b.UseSqlServer(connectionString,
// sql => sql.MigrationsAssembly(assembly));
//})
//.AddOperationalStore(options =>
//{
// options.ConfigureDbContext = b => b.UseSqlServer(connectionString,
// sql => sql.MigrationsAssembly(assembly));
//})
////.AddSigningCredential(certificate);
//.AddDeveloperSigningCredential();
//.AddConfigurationStore(options =>
//{
// options.ConfigureDbContext = b => b.UseSqlServer(connectionString,
// sql => sql.MigrationsAssembly(assembly));
//})
//.AddOperationalStore(options =>
//{
// options.ConfigureDbContext = b => b.UseSqlServer(connectionString,
// sql => sql.MigrationsAssembly(assembly));
//})
////.AddSigningCredential(certificate);
//.AddDeveloperSigningCredential();
.AddInMemoryApiResources(Configuration.GetApis())
.AddInMemoryIdentityResources(Configuration.GetIdentityResources())
.AddInMemoryClients(Configuration.GetClients())
......@@ -77,7 +77,11 @@ namespace IdentityServer
{
config.AppId = "600315157247054";
config.AppSecret = "71af5f609c1f1986b8e87e162093682b";
});
}).AddGoogle(config =>
{
config.ClientId = "194427682908-6oq4954qikubdph250cakfqonssc39up.apps.googleusercontent.com";
config.ClientSecret = "6LxQlYi2g0B3A9enj5bkCloB";
}); ;
services.AddControllersWithViews();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment