Full stack .NET 6 PostgreSQL backend with identity server 4 + is4 Skoruba admin.
- Docker
- Linux OS x64
- Yarn
- Run in frontend (for proto)
cd frontend
yarn install
- Copy
config.example.yml
toconfig.yml
. - Run
./manage.py run dev
./manage.py build prod
./manage.py push prod
Just open http://172.17.0.1:2020
and enter the admin username/password in config.yml
.
Add user, then login in http://172.17.0.1:2022
.
You can access swagger on http://172.17.0.1:2025/swagger
.
You might need to add client Redirect URI and CORS in PhpPgAdmin http://172.17.0.1:2024
:
- Config everything in
config.yml
. - Add your redirect URI for your domain (
/signin-oidc
) in phppgadmin > is4admin > ClientRedirectUris for ClientId skoruba_identity_admin
- Admin setting (
IdentityServer4.Admin-release-2.1.0/src/Skoruba.IdentityServer4.Admin/appsettings.json
):
- Changed database
"DatabaseProviderConfiguration": {
"ProviderType": "PostgreSQL"
},
- Changed db string connection
Server=localhost; User Id=postgres; Database=is4admin; Port=5432; Password=postgres; SSL Mode=Prefer; Trust Server Certificate=true
- Added timezone options for postgres in main func
IdentityServer4.Admin-release-2.1.0/src/Skoruba.IdentityServer4.Admin/Program.cs
IdentityServer4.Admin-release-2.1.0/src/Skoruba.IdentityServer4.Admin.Api/Program.cs
IdentityServer4.Admin-release-2.1.0/src/Skoruba.IdentityServer4.STS.Identity/Program.cs
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
- Added
password
grant type IdentityServer4.Admin-release-2.1.0/src/Skoruba.IdentityServer4.Admin/identityserverdata.json
"Clients": [
{
...
"AllowedGrantTypes": [
"authorization_code",
"password"
],
...
}
]