superfaceai / passport-twitter-oauth2

Twitter OAuth 2.0 Strategy for Passport for accessing Twitter API v2
MIT License
28 stars 9 forks source link

-delete this- #8

Closed phuze closed 2 years ago

phuze commented 2 years ago

-delete this-

jnv commented 2 years ago

Hey @phuze, assuming you managed to resolve the issue, don't hesitate to close it on your own. I will go ahead and close it.

phuze commented 2 years ago

Sorry mate, I didn't close as I figured you'd rather just delete it.

I can't say I solved the root issue, but I did manage to identify the trigger. It seems to be related to Microsoft's Azure Active Directory passport strategy, passport-azure-ad.

I found that simply requiring it:

const MicrosoftStrategy = require('passport-azure-ad').OIDCStrategy

ends up breaking passport:

C:\<my_path>\node_modules\passport\lib\sessionmanager.js:90
      cb();
      ^
TypeError: cb is not a function

I wasn't actually able to identify the root cause, but the issue can be reproduced. I found that replacing passport-azure-ad with passport-microsoft worked to prevent the callback issue.