提交 68bf8359 编写于 作者: C chenruilong

fix: 无法从 clientInfo 中获取 uniIdToken

上级 c7e37665
......@@ -10,3 +10,4 @@ uni_modules_tools/copy
.idea
.vscode
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/.eslintrc.js
.uni-devtools
......@@ -9,3 +9,4 @@ uni_modules_tools
uni_modules.config.json
.idea
.vscode
.uni-devtools
## 1.0.34(2022-11-29)
- 优化 toast 错误提示时间为3秒
- uni-id-co 修复 无法从 clientInfo 中获取 uniIdToken
## 1.0.33(2022-11-25)
- uni-id-co 新增 外部系统联登接口,可为外部系统创建与uni-id相对应的账号,使该账号可以使用依赖uniId的系统及功能 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#external)
- uni-id-co 新增 URL化请求时鉴权签名验证 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#http-reqeust-auth)
......
......@@ -9,7 +9,7 @@ let hostUserInfo = uni.getStorageSync('uni-id-pages-userInfo')||{}
console.log( hostUserInfo);
const data = {
userInfo: hostUserInfo,
hasLogin: getUniIdTokenExpired() > Date.now()
hasLogin: Object.keys(hostUserInfo).length != 0
}
console.log('data', data);
......
{
"id": "uni-id-pages",
"displayName": "uni-id-pages",
"version": "1.0.33",
"version": "1.0.34",
"description": "云端一体简单、统一、可扩展的用户中心页面模版",
"keywords": [
"用户管理",
......
......@@ -177,9 +177,9 @@ async function postLogin (params = {}) {
isThirdParty = false
} = params
const {
clientIP,
uniIdToken
clientIP
} = this.getUniversalClientInfo()
const uniIdToken = this.getUniversalUniIdToken()
const uid = user._id
const updateData = {
last_login_date: Date.now(),
......
......@@ -97,9 +97,9 @@ async function postRegister (params = {}) {
channel,
scene,
clientIP,
osName,
uniIdToken
osName
} = this.getUniversalClientInfo()
const uniIdToken = this.getUniversalUniIdToken()
merge(user, extraData)
......
{
"name": "uni-id-co",
"version": "1.0.33",
"version": "1.0.34",
"description": "",
"main": "index.js",
"keywords": [],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册