0.31.0 • Published 10 months ago
@fangcha/sso-server v0.31.0
sso-server
Installation
# Use npm
npm install @fangcha/sso-server
# Or use yarn
yarn add @fangcha/sso-server
Options
interface Options {
database: FCDatabase
accountServer: AccountServer
redisConfig: RedisConfig
// Default: fc_sso_client
tableName_SsoClient?: string
// Default: fc_user_auth
tableName_UserAuth?: string
}
Usage
Step 1. Use SsoServer
import { SsoServer } from '@fangcha/sso-server'
import { AccountServer } from '@fangcha/account'
export const MySsoServer = new SsoServer({
database: <mysql connection>,
redisConfig: <redis connection config>,
accountServer: new AccountServer({
database: <mysql connection>,
}),
})
Step 2. Use SsoWebPlugin
import { WebApp } from '@fangcha/backend-kit/lib/router'
import { SsoWebPlugin } from '@fangcha/sso-server/lib/web-sdk'
const app = new WebApp({
……
plugins: [
SsoWebPlugin({
ssoServer: MySsoServer,
}),
SsoClientsAutoReloadPlugin(MySsoServer),
],
})
app.launch()
0.31.0
10 months ago
0.30.0
1 year ago
0.29.0
1 year ago
0.27.0
1 year ago
0.26.0
1 year ago
0.25.0
1 year ago
0.24.0
1 year ago
0.23.0
1 year ago
0.22.0
1 year ago
0.21.0
1 year ago
0.20.1
1 year ago
0.20.0
1 year ago
0.19.0
1 year ago
0.18.0
1 year ago
0.17.0
1 year ago
0.16.0
1 year ago
0.15.0
1 year ago
0.14.0
1 year ago
0.13.0
1 year ago
0.12.0
1 year ago
0.11.0
1 year ago
0.10.0
1 year ago
0.9.0
1 year ago
0.8.1
1 year ago
0.8.0
1 year ago
0.7.0
1 year ago
0.6.1
1 year ago
0.6.0
2 years ago
0.5.0
2 years ago
0.4.3
2 years ago
0.4.2
2 years ago
0.4.1
2 years ago
0.4.0
2 years ago
0.3.1
2 years ago
0.3.0
2 years ago
0.2.0
2 years ago