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

fix: 无法从 clientInfo 中获取 uniIdToken

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