
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@doctorwork/sso-sdk
Advanced tools
npm install @doctorwork/sso-sdk
const sso = require("@doctorwork/sso-sdk")('dev');
在 index.html中加入
<script src="https://cdn.doctorwork.com/sso/sdk.min.js?env=prod"></script>
在 index.html中加入
new HtmlWebpackPlugin({
template: './src/public/template.html',
title: 'Custom template using html-loader',
env: process.env.APP_ENV
})
<script src="https://cdn.doctorwork.com/sso/sdk.min.js?env=<%= htmlWebpackPlugin.options.env %>"></script>
在 .umirc.js 中加入
// [env] 替换为对应环境变量
export default {
scripts: [
"https://cdn.doctorwork.com/sso/sdk.min.js?env=" + process.env.BuildEnv || 'dev'
],
}
在 app.html 中加入
// web.config.js
{
html: {
env: process.env.APP_ENV
}
}
<script src="https://cdn.doctorwork.com/sso/sdk.min.js?env=<%= htmlWebpackPlugin.options.env %>"></script>
在 index.html 中加入
process.env.APP_ENV=dev
// 可以直接使用 环境变量
<script src="https://cdn.doctorwork.com/sso/sdk.min.js?env=<%= APP_ENV %>"></script>
SDK,使用umd规范,默认会在window下注册全局变量 $sso
返回当前环境对应的注册回调地址,目前各环境注册地址如下
| 环境 | 地址 |
|---|---|
| dev | https://sphinx.xingrengo.com |
| qa | https://sphinx.aihaisi.com |
| pre | https://sphinx.xrxr.xyz |
| prod | https://sphinx.xrxr.xy |
返回值
http://oa.sso.developer.doctorwork.com/
MIT.
FAQs
--- title: sso-js-sdk ---
The npm package @doctorwork/sso-sdk receives a total of 85 weekly downloads. As such, @doctorwork/sso-sdk popularity was classified as not popular.
We found that @doctorwork/sso-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.