-
-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Labels
Description
Packages used:
bozhao:link-accounts
zhaoyao91:accounts-wechat-mp
zhaoyao91:short-oauth-state
Wechat-MP (公众号) uses 'redirect' login style. When linking, it always creates a new account instead of linking to the existing user. Any thoughts?
Here is how I call link:
linkWithWechatMP({ Meteor }, options, callback) {
if (!Meteor.userId()) {
throw new Meteor.Error(402, 'Please login to an existing account before link.');
}
if (!Package[ 'zhaoyao91:accounts-wechat-mp' ]) {
throw new Meteor.Error(403, 'Please include zhaoyao91:accounts-wechat package')
}
if (!callback && typeof options === "function") {
callback = options;
options = null;
}
var credentialRequestCompleteCallback = Accounts.oauth.linkCredentialRequestCompleteHandler(callback);
WeChatMP.requestCredential(options, credentialRequestCompleteCallback);
},
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo