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 obtain access token #73

Open
tdinckaya opened this issue Jan 7, 2025 · 1 comment
Open

InternalOAuthError: Failed to obtain access token #73

tdinckaya opened this issue Jan 7, 2025 · 1 comment

Comments

@tdinckaya
Copy link

When I want to get access token with Github, I get the following error. After the callback, it gives an error like the one below.

InternalOAuthError: Failed to obtain access token
at Strategy.OAuth2Strategy._createOAuthError (/APP/code-push-server-standalone/api/node_modules/passport-oauth2/lib/strategy.js:423:17)
at /APP/code-push-server-standalone/api/node_modules/passport-oauth2/lib/strategy.js:177:45
at /APP/code-push-server-standalone/api/node_modules/oauth/lib/oauth2.js:191:18
at ClientRequest. (/APP/code-push-server-standalone/api/node_modules/oauth/lib/oauth2.js:162:5)
at ClientRequest.emit (node:events:513:28)
at ClientRequest.emit (node:domain:489:12)
at TLSSocket.socketErrorListener (node:_http_client:494:9)
at TLSSocket.emit (node:events:513:28)
at TLSSocket.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:157:8)

@vaidyakhil
Copy link

on adding some logs, I found that the error at oauth/lib/oauth2.js:191 was an SSL error:
Error: self-signed certificate in certificate chain when I was using the application under a VPN.

Had to add NODE_TLS_REJECT_UNAUTHORIZED=0 in the .env to get it to work, might be relevant to add in the README.md or the example env file itself

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

2 participants