Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: object is not a function #2

Open
ghost opened this issue Jan 9, 2014 · 3 comments
Open

TypeError: object is not a function #2

ghost opened this issue Jan 9, 2014 · 3 comments

Comments

@ghost
Copy link

ghost commented Jan 9, 2014

Just wanted to check if there were any updates to this project? I tried to get it working today, but when I try to passport.use(new SharePointStrategy(...)); I am getting TypeError: object is not a function.

    var strategy = new SharePointStrategy({
            "appId": appId,
            "appSecret": appSecret,
            "callbackURL": callbackURL
        },
        function(accessToken, refreshToken, profile, done) {
            return done(null, profile);    
        }
    );

I looked through the code and found a few JSLint errors including some missing semi-colons, a few variable scope issues, etc. I fixed those up in my local directory but it didn't fix the problem.

I just wanted to check if you have newer code or any ideas what might be causing this before I start trying to debug it myself.

@ghost
Copy link
Author

ghost commented Jan 9, 2014

FYI - running on Cloud9 IDE with Node 0.10.22.

@macrauder
Copy link
Contributor

Hi Chris,
we using the package extensively.
Do you have a stacktrace so that I can see where the error occures?
If you have code/style fixes your welcome to contribute it so that we can merge it in.

@ghost
Copy link
Author

ghost commented Jan 14, 2014

Sorry for not replying sooner, I have been busy re-organizing my sample code and working on a few other things. I will give it another go today and see if I can debug further. The stack trace wasn't useful since the exception is being caught in the module loader when trying to call the SharePointStrategy constructor. It wasn't useful (to me at least) and trying to debug into the constructor didn't reveal anything to me. I will probably have to fork and start cutting away parts of the module to try to isolate. If I have time to get that far, I will let you know what I find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant