我想将 PassportJS 与 Freshbooks.com 一起使用。
Freshbooks 使用 OAuth 1.0a,因此我复制了 passport-linkedin 存储库并尝试将其转换为 Freshbooks。
我收到一个我不明白的错误:
failed to obtain request token (status: 400 data: Unsupported signature method specified.)
Passport 有调试开关吗?我还使用 OAuthStrategy 组合了另一个版本,但我遇到了同样的错误。
Freshbooks OAuth API 在这里:http: //developers.freshbooks.com/authentication-2/#OAuth
要在模块中运行示例服务器:
git clone git@github.com:MichaelJCole/passport-freshbooks.git
npm install
npm install passport express ejs passport-oauth
node example/login/app.js
堆栈跟踪:
failed to obtain request token (status: 400 data: Unsupported signature method specified.)
at /home/michaelcole/scm/passport-freshbooks/node_modules/passport-oauth/lib/passport-oauth/strategies/oauth.js:196:36
at /home/michaelcole/scm/passport-freshbooks/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:518:17
at passBackControl (/home/michaelcole/scm/passport-freshbooks/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:374:13)
at IncomingMessage.<anonymous> (/home/michaelcole/scm/passport-freshbooks/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:386:9)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:910:16
at process._tickCallback (node.js:415:13)