SSO-Solution is a (nearly) production ready cross platform, open source, single-sign-on solution built with .net core 3.0, IdentityServer4, and PostGreSql.
OS | Supported |
---|---|
Windows | ✔️ |
Linux | ❌ coming soon |
MacOs | ❌ coming soon |
The following default tools and services are used, but they can be changed depending on your individual needs.
Service | Tool |
---|---|
Identity | Microsot.AspNetCore.Identity |
OIDC/OAuth 2.0 | IdentityServer4 |
Database | PostGreSql |
Logging | Serilog |
TBD |
It's easy to get started developing your own solution.
- Download and install .net core 3.0
- Install openssl. Here's a guide
- Install PostGreSql
- Open up a cmd or terminal and navigate to where you want to create a new solution
- Install the template by running
dotnet new --install sso-sln
Create a new solution using the installed template by running dotnet new sso-sln
- add
-d samplewebsite.com
to specify the domain name (defaults towebsite.com
) - Do Not use the
--output
arg for dotnet new, the post-install scripts will not be run and you will have to run them manually. Instead create a folder with the solution's name and run the command from there. - (Optional) add
--allow-scripts yes
to run the post install scripts without being prompted
- Navigate to the folder containing the
.csproj
file for the Identity Server - Update the connecstion string in
appsettings.Development.json
- Run
dotnet run --seed
Notes
- To clean the database run
dotnet run --clean
- To clean and reseed the database run
dotnet run --clean --seed
- To only migrate the database and not run the project add the
--dont-run
arg
To run the identity server navigate to the project and run dotnet run
There are dotnet samples and a node samples which are preconfigured to run with your newly created identity server. Go to their respective folders and run them according to their tooling.
Coming soon...
Coming soon...
The template includes the following 2 scripts that are run after installation:
- CallAddHosts (Requires admin privileges ) - Updates your hosts file to add the applications url (
website.com
by default) to point to127.0.0.1
. - CallCreateSSLCertificate (Requires admin privileges ) - Creates and installs a self-signed SSL Certificate to your machine and the newly created solution.
By default you are prompted to run the scripts, or you can add --allow-scripts yes
to dotnet new sso-sln
.