一键登录云函数构建,手机号一键登录调试
This commit is contained in:
11
uniCloud-aliyun/cloudfunctions/phone-login/index.js
Normal file
11
uniCloud-aliyun/cloudfunctions/phone-login/index.js
Normal file
@@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
exports.main = async (event, context) => {
|
||||
return await uniCloud.getPhoneNumber({
|
||||
appid: '__UNI__CD19AAD',
|
||||
provider: 'univerify',
|
||||
apiKey : '16fa20236696596869759d3a81541901', // 在开发者中心开通服务并获取apiKey
|
||||
apiSecret: 'fca97287360c2e8f8259d8877a601887', // 在开发者中心开通服务并获取apiSecret
|
||||
access_token: event.access_token,
|
||||
openid: event.openid
|
||||
})
|
||||
};
|
||||
Reference in New Issue
Block a user