这里说的是仅仅使用leancloud作为公众号后台数据存储使用,这里用户并没有绑定到微信开放平台,所以没有用户的token信息, openid以及基本用户信息(名字等)可以通过公众号后台api得到(https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140839)并作为authData传入AV.User.loginWithAuthData,但是并没有access_token/expires_in/refresh_token等authData信息,这样使用AV.User.loginWithAuthData就会报错:
error: { Error: 无效的第三方注册数据(authData)。 [400 POST http://e1-api.leancloud.cn/1.1/users]
STDERR web-s 21:47:19
at /home/leanengine/app/node_modules/leancloud-storage/dist/node/request.js:163:17
STDERR web-s 21:47:19
at tryCatch (/home/leanengine/app/node_modules/es6-promise/dist/es6-promise.js:410:12)
STDERR web-s 21:47:19
at invokeCallback (/home/leanengine/app/node_modules/es6-promise/dist/es6-promise.js:425:13)
STDERR web-s 21:47:19
at publish (/home/leanengine/app/node_modules/es6-promise/dist/es6-promise.js:399:7)
STDERR web-s 21:47:19
at publishRejection (/home/leanengine/app/node_modules/es6-promise/dist/es6-promise.js:340:3)
STDERR web-s 21:47:19
at flush (/home/leanengine/app/node_modules/es6-promise/dist/es6-promise.js:128:5)
STDERR web-s 21:47:19
at process.tickCallback (internal/process/nexttick.js:61:11) code: 1, rawMessage: '无效的第三方注册数据(authData)。' }
请问如果只是单纯的通过openid在leancloud的_User表中创建一个用户,应该怎么做?(其实不需要User登录,因为公众号后端服务器可以认为微信后台回调过来的操作都是用户已经关注过的合法用户)