我正在添加 Apple 登录,这是加入 Meteor 的最新 oauth 包,但我遇到了错误消息“服务未配置”。似乎很多解决方案[另一个] 都在谈论使用ServiceConfiguration
来修复这些错误,但我不必初始化任何其他流星登录,例如loginWithGoogle
或loginWithFacebook
。根据我对 github 包 Meteor.loginWithApple 的阅读,其配置方式与这些现有登录功能相同。什么配置问题可能会触发此问题?
当我看的时候Meteor.settings.private.oAuth
,apple
就在google
旁边facebook
。
首先,我安装了这两个https://atmospherejs.com/quave/accounts-apple,https://atmospherejs.com/quave/apple-oauth
meteor add quave:accounts-apple
meteor add quave:apple-oauth
然后按照本指南config
在settings.json
facebook 和 google 旁边设置。oauth
设置.json:
"apple": {
"teamId": "yyexamplexx",
"clientId": "com.example.client",
"keyId": "zzexamplewq",
"secret": "zxcvsdfasdfexamplezlongstrxcvsdfasdf",
"redirectUri": "https://example.com/apple-redirect"
},
客户:
continueWithApple = () => {
Meteor.loginWithApple({}, function(err, res) {
if (err) {
console.log(err);
}
//running ok
});
};
<Form.Button
id="appleid-signin"
fluid
basic
className="continue apple"
data-color="black"
data-border="true"
data-type="sign in"
onClick={() => {
this.continueWithApple();
}}
>