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

InternalOAuthError: failed to fetch user profile #56

Closed
jhenriquez opened this issue Mar 30, 2016 · 1 comment
Closed

InternalOAuthError: failed to fetch user profile #56

jhenriquez opened this issue Mar 30, 2016 · 1 comment

Comments

@jhenriquez
Copy link

I am aware of this issue: #48

Though I'm not sure if they were having this specific message.

status: 403
message: Request forbidden by administrative rules. Please make sure your request has a User-Agent header (http://developer.github.com/v3/#user-agent-required). Check https://developer.github.com for other possible causes.

But it seems this is different, and only appears on latest versions of node. It's happening when running on versions 5.8.0 and 5.9.1. Before that it had been working for me on version 4.2.4

I'm using version 0.1.5 of passport-github. Version 1.1.0 breaks with: _this.oauth2.useAuthorizationHeaderforGET is not a function so does passport-github2.

Probably, this problem is not specific to passport-github and more related to underlying libraries.

Thanks in advance. Any advice will be greatly appreciated.

@jhenriquez
Copy link
Author

UPDATE:

We've finally reach the problem, the actual problem is way more simple. We're using node-trello in our project. Node trello requires a specific version of oauth (0.9.7) and this is a dependency of passport-oauth.

I'm not very familiar with how NPM resolves dependencies, but it seems NPM 2 (node 4x) resolves conflicts by letting everyone have it's own dependency, downloading the latest oauth (0.9.14) for passport-oauth and version 0.9.7 for node-trello.

NPM 3 does not work like this, it seems it allows all packages to an available version, in this case oauth (0.9.7) since node-trello is the one that requried specifically.

The quick solution for us was to simply add oauth (0.9.14) as one of our own project dependencies, I think a version as early as 0.9.11 might be enough though.

screenshot from 2016-03-30 02-08-00

So, probably, by looking at the tree, maybe this issue actually belongs in passport-oath, I believe they should specify their dependency on oauth to avoid this sort of problems.

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