Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
I
Implementation-IdentityServer4
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alan Farhadi
Implementation-IdentityServer4
Commits
38a56016
Commit
38a56016
authored
Jun 02, 2020
by
alan.f
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add-google-login
parent
cb4412a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
Startup.cs
IdentityServer/Startup.cs
+18
-14
No files found.
IdentityServer/Startup.cs
View file @
38a56016
...
@@ -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
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment