SPA implementation from Skoruba.IdentityServer4.Admin includes Identityserver4 and Admin,thanks alot!
- 使用以下配置连接到demo认证中心 (isawesome.cn)
const config = {
authority: 'https://isawesome.cn:5000',
//authority: 'http://localhost:5000',
client_id: 'spa',
redirect_uri: 'http://localhost:5501/callback.html',
post_logout_redirect_uri: 'http://localhost:5501/index.html',
response_type: 'code',
userStore: new Oidc.WebStorageStateStore({ store: window.localStorage }),
scope: 'openid',
// prompt: 'none'
};
-
克隆项目到本地
git clone https://github.com/Kurris/IdentityServer.STS.Admin.git
-
检查配置文件
cd ./IdentityServer.STS.Admin/src/appsetting.json
//数据库配置 "ConnectionStrings": { "ConfigurationDbConnection": "", "PersistedGrantDbConnection": "", "IdentityDbConnection": "" }
//前端项目启动地址 "FrontendBaseUrl": "http://localhost:8080",
-
根据DbContext生成数据库,详见(ef core migration)
-
种子数据/数据脚本
执行 sh seed.sh 初始化数据 默认账号密码 admin/@p123456
-
项目启动
#IdentityServer.STS.Admin/src dotnet run # http://localhost:5000 #IdentityServer.STS.Admin/src/UI npm install npm run serve # http://localhost:8080
浏览器启动: http://localhost:8080/signIn
- Provide startup script and Admin account data
- Use vue3 rebuild UI
- Admin-dashboard