1.5.7 • Published 3 days ago
vue-ydph-authing v1.5.7
托管页对接authing - 兼容vue2、vue3
安装
npm install vue-ydph-authing
引入
import ydphAuthing from 'vue-ydph-authing'
登录
在需要登录的地方写入以下代码
// 配置
const config = {
appKey: '', // 接口请求头中携带,找架构沟通获取
authType: "authingCodeAuth", // 写死 - 如果需要其他认证方式,和架构沟通
appId: '', // 应用的appId - 从Authing平台获取
redirectUri: '', // 登录回调地址 - 从Authing平台获取
host: '', // 从应用面板 - 单点登录 - 配置 - 应用面板获取
authUrl: "/base-gateway/auth", // code换token的接口地址 - 不用改
logoutUrl: "/base-gateway/auth/logout", // 网关退出的接口地址 - 不用改
}
// 初始化
ydphAuthing.init(config).then(userInfo => {
// userInfo就是authing返回的用户数据
console.log('authing返回userInfo', userInfo)
})
退出
- 正常退出
ydphAuthing.baseGatewayLogout()
- 401退出
注意: 401退出,登录后会重定向到退出时的页面,如果不需要重定向,可用正常退出
ydphAuthing.logoutFor401()
1.5.7
3 days ago
1.5.6
3 days ago
1.5.5
3 days ago
1.5.4
9 days ago
1.5.3
9 days ago
1.5.2
2 months ago
1.5.1
5 months ago
1.5.0
5 months ago
1.4.9
5 months ago
1.4.8
5 months ago
1.4.7
5 months ago
1.4.6
5 months ago
1.4.5
5 months ago
1.4.4
6 months ago
1.4.3
6 months ago
1.4.2
6 months ago
1.4.1
6 months ago
1.4.0
6 months ago
1.3.0
6 months ago
1.2.9
6 months ago
1.2.8
6 months ago
1.2.7
6 months ago
1.2.6
6 months ago
1.2.5
6 months ago
1.2.4
6 months ago
1.2.3
6 months ago
1.2.2
6 months ago
1.2.1
6 months ago
1.2.0
6 months ago
1.1.9
6 months ago
1.1.8
6 months ago
1.1.7
6 months ago
1.1.6
6 months ago
1.1.5
6 months ago
1.1.4
7 months ago
1.1.3
7 months ago
1.1.2
7 months ago
1.1.1
7 months ago
1.1.0
7 months ago
1.0.9
7 months ago
1.0.8
7 months ago
1.0.7
7 months ago
1.0.6
7 months ago
1.0.5
7 months ago
1.0.4
7 months ago
1.0.3
7 months ago
1.0.2
7 months ago
1.0.1
7 months ago
1.0.0
7 months ago