I'm using mean.io and I've basically replaced any mention of the Github passport strategy with another strategy that also uses passport, passport-fitbit. From what I can see it should work out of the box - so to speak.

However when I click on the sign up with button in the mean.io demo app, I get the following error:

Error: no strategy registered under name: fibit
at attempt (/project/node_modules/passport/lib/passport/middleware/authenticate.js:237:37)
at Passport.authenticate (/project/node_modules/passport/lib/passport/middleware/authenticate.js:244:7)
at callbacks (/project/node_modules/express/lib/router/index.js:164:37)
at param (/project/node_modules/express/lib/router/index.js:138:11)
at pass (/project/node_modules/express/lib/router/index.js:145:5)
at Router._dispatch (/project/node_modules/express/lib/router/index.js:173:5)
at Object.router (/project/node_modules/express/lib/router/index.js:33:10)
at next (/project/node_modules/express/node_modules/connect/lib/proto.js:193:15)
at Object.handle (/project/node_modules/connect-flash/lib/flash.js:21:5)
at Context.next (/project/node_modules/express/node_modules/connect/lib/proto.js:193:15)

Anyone have any ideas?

有帮助吗?

解决方案

You didn't show any of your code, but based on the error message it looks like you've misspelled "fitbit" somewhere. The error message references an unregistered name of "fibit" (which is missing the first "t"). Search your code for "fibit" and replace with "fitbit" and try again.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top