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

add-google-login

parent cb4412a6
...@@ -30,7 +30,7 @@ namespace IdentityServer ...@@ -30,7 +30,7 @@ namespace IdentityServer
config.UseSqlServer(connectionString); config.UseSqlServer(connectionString);
//config.UseInMemoryDatabase("Memory"); //config.UseInMemoryDatabase("Memory");
}); });
// AddIdentity registers the services // AddIdentity registers the services
services.AddIdentity<IdentityUser, IdentityRole>(config => services.AddIdentity<IdentityUser, IdentityRole>(config =>
{ {
...@@ -55,18 +55,18 @@ namespace IdentityServer ...@@ -55,18 +55,18 @@ namespace IdentityServer
//var certificate = new X509Certificate2(filePath,"Cesc007+"); //var certificate = new X509Certificate2(filePath,"Cesc007+");
services.AddIdentityServer() services.AddIdentityServer()
.AddAspNetIdentity<IdentityUser>() .AddAspNetIdentity<IdentityUser>()
//.AddConfigurationStore(options => //.AddConfigurationStore(options =>
//{ //{
// options.ConfigureDbContext = b => b.UseSqlServer(connectionString, // options.ConfigureDbContext = b => b.UseSqlServer(connectionString,
// sql => sql.MigrationsAssembly(assembly)); // sql => sql.MigrationsAssembly(assembly));
//}) //})
//.AddOperationalStore(options => //.AddOperationalStore(options =>
//{ //{
// options.ConfigureDbContext = b => b.UseSqlServer(connectionString, // options.ConfigureDbContext = b => b.UseSqlServer(connectionString,
// sql => sql.MigrationsAssembly(assembly)); // sql => sql.MigrationsAssembly(assembly));
//}) //})
////.AddSigningCredential(certificate); ////.AddSigningCredential(certificate);
//.AddDeveloperSigningCredential(); //.AddDeveloperSigningCredential();
.AddInMemoryApiResources(Configuration.GetApis()) .AddInMemoryApiResources(Configuration.GetApis())
.AddInMemoryIdentityResources(Configuration.GetIdentityResources()) .AddInMemoryIdentityResources(Configuration.GetIdentityResources())
.AddInMemoryClients(Configuration.GetClients()) .AddInMemoryClients(Configuration.GetClients())
...@@ -77,7 +77,11 @@ namespace IdentityServer ...@@ -77,7 +77,11 @@ namespace IdentityServer
{ {
config.AppId = "600315157247054"; config.AppId = "600315157247054";
config.AppSecret = "71af5f609c1f1986b8e87e162093682b"; config.AppSecret = "71af5f609c1f1986b8e87e162093682b";
}); }).AddGoogle(config =>
{
config.ClientId = "194427682908-6oq4954qikubdph250cakfqonssc39up.apps.googleusercontent.com";
config.ClientSecret = "6LxQlYi2g0B3A9enj5bkCloB";
}); ;
services.AddControllersWithViews(); 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