Skip to content

Single Sign On Authorization with Identity Server

Notifications You must be signed in to change notification settings

duycs/sso-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSO Identity

Criteria

Create a Single sign on authentication server, support development many applications with only once sign on

Development environment

  • Visual Studio Code
  • IdentityServer4
  • MySQL

Setup

To run the demo

1. Clone/Fork this repository.

2. Create the database on MySQL server by using the dotnet cli to run the migrations from within the command

Create EFMigrateHistory table at each database

CREATE TABLE `__EFMigrationsHistory` ( `MigrationId` nvarchar(150) NOT NULL, 
`ProductVersion` nvarchar(32) NOT NULL, 
PRIMARY KEY (`MigrationId`) );

Set environment

$env:ASPNETCORE_ENVIRONMENT = 'Development'

Migrate database

dotnet ef database update --context AppIdentityDbContext
dotnet ef database update --context PersistedGrantDbContext

Force delete all table if need

SET FOREIGN_KEY_CHECKS = 0; 
SET @tables = NULL;
SELECT GROUP_CONCAT(table_schema, '.', table_name) INTO @tables
  FROM information_schema.tables 
  WHERE table_schema = 'identity'; -- specify DB name here.
SET @tables = CONCAT('DROP TABLE ', @tables);
PREPARE stmt FROM @tables;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;ls
SET FOREIGN_KEY_CHECKS = 1; 

References

About

Single Sign On Authorization with Identity Server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published