
Product
Introducing Webhook Events for Pull Request Scans
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
@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 ---
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
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.