我在Meteor(版本0.6.6.3)中收到以下错误,并单击Twitter的登录按钮。
I2038-06:13:28.670(-8)? Exception while invoking method 'login' Error: Failed to send OAuth1 request to https://api.twitter.com/oauth/request_token. failed [401] Failed to validate oauth signature and token
I2038-06:13:28.673(-8)? at OAuth1Binding._call (packages/oauth1/oauth1_binding.js:143)
I2038-06:13:28.674(-8)? at OAuth1Binding.prepareRequestToken (packages/oauth1/oauth1_binding.js:27)
I2038-06:13:28.675(-8)? at Oauth._requestHandlers.(anonymous function) (packages/oauth1/oauth1_server.js:21)
I2038-06:13:28.676(-8)? at middleware (packages/oauth/oauth_server.js:105)
I2038-06:13:28.677(-8)? at packages/oauth/oauth_server.js:78
有人对如何解决这个问题有想法吗?
谢谢
最佳答案
我有同样的问题,是由于手动删除和不正确地插入loginServiceConfiguration引起的。如果不使用配置工具,请确保插入的是consumerKey
而不是clientId
。
Accounts.loginServiceConfiguration.remove({
service: "twitter"
});
Accounts.loginServiceConfiguration.insert({
service: "twitter",
consumerKey: "...",
secret: "..."
});