问题标签 [passport-freshbooks]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
node.js - Why can't I use credentials to make followup oauth call
I am using passport-freshbooks to authenticate and retrieve a token and tokenSecret. However, when I try to use those with a separate OAuth object, I get a 401 authentication failed error.
The strategy used by passport-freshbooks uses the same oauth library, and the call to "post" is identical to the followup call (at least it looks the same to me, but maybe I'm missing something obvious).
Here's some of the pertinent code from the passport strategy:
#xA;I try to use that same token and tokenSecret later. I'm creating a new OAuth object, but setting it with the identical settings passed to the passport strategy. Here's some code from that:
#xA;These look the same to me. However, the first one passes, and the second fails with this response:
#xA;What is it that I'm doing wrong? I've included to "log.info" lines to show that I've compared the token and tokenSecret, and they are indeed the same. What is it I'm missing?
node.js - 如何将从路由处理程序获取的变量传递给护照新鲜书策略的中间件定义?
我正在使用护照新书策略,这与任何其他策略非常相似,只是我认为它的创作不正确(如果我没有遗漏任何东西)。我发现您需要在其定义阶段将一个变量传递给它的中间件,您只能通过路由处理程序从用户那里获得。
要设置subdomain
上述内容,您需要先从用户那里获取
那么我如何subdomain
在上面的护照策略的中间件定义中设置它呢?
它可能需要改变策略本身,但我不确定如何进行,有什么想法吗?