Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-id-pages-x
提交
e7ec4ed8
H
hello uni-id-pages-x
项目概览
DCloud
/
hello uni-id-pages-x
通知
40
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-id-pages-x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
e7ec4ed8
编写于
4月 28, 2024
作者:
Anne_LXM
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
兼容uni-app-x对客户端uniPlatform的调整(uni-app-x内uniPlatform区分app-android、app-ios)
上级
efce7305
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
33 addition
and
24 deletion
+33
-24
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/common/utils.js
...pages-x/uniCloud/cloudfunctions/uni-id-co/common/utils.js
+0
-7
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/index.obj.js
...id-pages-x/uniCloud/cloudfunctions/uni-id-co/index.obj.js
+2
-0
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/npm/index.js
...ages-x/uniCloud/cloudfunctions/uni-id-co/lib/npm/index.js
+3
-0
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/third-party/apple/account/index.js
...unctions/uni-id-co/lib/third-party/apple/account/index.js
+5
-2
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/config.js
...s-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/config.js
+12
-10
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/qq.js
...pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/qq.js
+2
-0
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/register.js
...x/uniCloud/cloudfunctions/uni-id-co/lib/utils/register.js
+3
-1
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/relate.js
...s-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/relate.js
+3
-1
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/weixin.js
...s-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/weixin.js
+2
-0
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/package.json
...id-pages-x/uniCloud/cloudfunctions/uni-id-co/package.json
+1
-3
未找到文件。
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/common/utils.js
浏览文件 @
e7ec4ed8
...
...
@@ -171,13 +171,6 @@ function getNonceStr (length = 16) {
return
str
.
substring
(
0
,
length
)
}
try
{
require
(
'
lodash.merge
'
)
}
catch
(
error
)
{
console
.
error
(
'
uni-id-co缺少依赖,请在uniCloud/cloudfunctions/uni-id-co目录执行 npm install 安装依赖
'
)
throw
error
}
function
isMatchUserApp
(
userAppList
,
matchAppList
)
{
if
(
userAppList
===
undefined
||
userAppList
===
null
)
{
return
true
...
...
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/index.obj.js
浏览文件 @
e7ec4ed8
...
...
@@ -111,6 +111,8 @@ module.exports = {
switch
(
clientPlatform
)
{
case
'
app
'
:
case
'
app-plus
'
:
case
'
app-android
'
:
case
'
app-ios
'
:
clientPlatform
=
'
app
'
break
case
'
web
'
:
...
...
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/npm/index.js
0 → 100644
浏览文件 @
e7ec4ed8
此差异已折叠。
点击以展开。
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/third-party/apple/account/index.js
浏览文件 @
e7ec4ed8
const
rsaPublicKeyPem
=
require
(
'
../rsa-public-key-pem
'
)
const
rsaPublicKeyPem
=
require
(
'
../rsa-public-key-pem
'
)
const
{
jwtVerify
}
=
require
(
'
../../../npm/index
'
)
let
authKeysCache
=
null
module
.
exports
=
class
Auth
{
...
...
@@ -44,7 +47,7 @@ module.exports = class Auth {
* nonce_supported: true
* }
*/
const
payload
=
require
(
'
jsonwebtoken
'
).
v
erify
(
const
payload
=
jwtV
erify
(
identityToken
,
rsaPublicKeyPem
(
usedKey
.
n
,
usedKey
.
e
),
{
...
...
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/config.js
浏览文件 @
e7ec4ed8
...
...
@@ -18,7 +18,7 @@ const uniIdConfig = createConfig({
})
class
ConfigUtils
{
constructor
({
constructor
({
context
}
=
{})
{
this
.
context
=
context
...
...
@@ -31,6 +31,8 @@ class ConfigUtils {
switch
(
uniPlatform
)
{
case
'
app
'
:
case
'
app-plus
'
:
case
'
app-android
'
:
case
'
app-ios
'
:
this
.
platform
=
'
app
'
break
case
'
web
'
:
...
...
@@ -43,7 +45,7 @@ class ConfigUtils {
}
}
getConfigArray
()
{
getConfigArray
()
{
let
configContent
try
{
configContent
=
require
(
'
uni-config-center/uni-id/config.json
'
)
...
...
@@ -57,12 +59,12 @@ class ConfigUtils {
return
[
configContent
]
}
getAppConfig
()
{
getAppConfig
()
{
const
configArray
=
this
.
getConfigArray
()
return
configArray
.
find
(
item
=>
item
.
dcloudAppid
===
this
.
appId
)
||
configArray
.
find
(
item
=>
item
.
isDefaultConfig
)
}
getPlatformConfig
()
{
getPlatformConfig
()
{
const
appConfig
=
this
.
getAppConfig
()
if
(
!
appConfig
)
{
throw
new
Error
(
...
...
@@ -76,8 +78,8 @@ class ConfigUtils {
throw
new
Error
(
`Client platform is
${
this
.
platform
}
, but
${
this
.
platform
===
'
web
'
?
'
h5
'
:
'
app-plus
'
}
was found in config. Please refer to: https://uniapp.dcloud.net.cn/uniCloud/uni-id-summary?id=m-to-co`
)
}
}
const
defaultConfig
=
{
tokenExpiresIn
:
7200
,
tokenExpiresThreshold
:
1200
,
...
...
@@ -87,7 +89,7 @@ class ConfigUtils {
return
Object
.
assign
(
defaultConfig
,
appConfig
,
appConfig
[
platform
])
}
getOauthProvider
({
getOauthProvider
({
provider
}
=
{})
{
const
clientPlatform
=
this
.
platform
...
...
@@ -101,7 +103,7 @@ class ConfigUtils {
return
oatuhProivder
}
getOauthConfig
({
getOauthConfig
({
provider
}
=
{})
{
const
config
=
this
.
getPlatformConfig
()
...
...
@@ -122,7 +124,7 @@ class ConfigUtils {
return
oauthConfig
}
getHooks
()
{
getHooks
()
{
if
(
uniIdConfig
.
hasFile
(
'
hooks/index.js
'
))
{
return
require
(
uniIdConfig
.
resolve
(
'
hooks/index.js
'
)
...
...
@@ -132,4 +134,4 @@ class ConfigUtils {
}
}
module
.
exports
=
ConfigUtils
module
.
exports
=
ConfigUtils
\ No newline at end of file
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/qq.js
浏览文件 @
e7ec4ed8
...
...
@@ -10,6 +10,8 @@ function getQQPlatform () {
switch
(
platform
)
{
case
'
app
'
:
case
'
app-plus
'
:
case
'
app-android
'
:
case
'
app-ios
'
:
return
'
app
'
case
'
mp-qq
'
:
return
'
mp
'
...
...
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/register.js
浏览文件 @
e7ec4ed8
...
...
@@ -16,7 +16,9 @@ const {
logout
}
=
require
(
'
./logout
'
)
const
PasswordUtils
=
require
(
'
./password
'
)
const
merge
=
require
(
'
lodash.merge
'
)
const
{
merge
}
=
require
(
'
../npm/index
'
)
async
function
realPreRegister
(
params
=
{})
{
const
{
...
...
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/relate.js
浏览文件 @
e7ec4ed8
...
...
@@ -14,7 +14,9 @@ const {
const
{
batchFindObjctValue
}
=
require
(
'
../../common/utils
'
)
const
merge
=
require
(
'
lodash.merge
'
)
const
{
merge
}
=
require
(
'
../npm/index
'
)
/**
*
...
...
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/weixin.js
浏览文件 @
e7ec4ed8
...
...
@@ -43,6 +43,8 @@ function getWeixinPlatform () {
switch
(
platform
)
{
case
'
app
'
:
case
'
app-plus
'
:
case
'
app-android
'
:
case
'
app-ios
'
:
return
'
app
'
case
'
mp-weixin
'
:
return
'
mp
'
...
...
uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/package.json
浏览文件 @
e7ec4ed8
{
"name"
:
"uni-id-co"
,
"version"
:
"1.1.
19
"
,
"version"
:
"1.1.
20
"
,
"description"
:
""
,
"main"
:
"index.js"
,
"keywords"
:
[],
"author"
:
"DCloud"
,
"dependencies"
:
{
"jsonwebtoken"
:
"8.5.1"
,
"lodash.merge"
:
"^4.6.2"
,
"uni-captcha"
:
"file:../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha"
,
"uni-config-center"
:
"file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
,
"uni-id-common"
:
"file:../../../../uni-id-common/uniCloud/cloudfunctions/common/uni-id-common"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录