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

OAuth Error on User Login #25

Open
micchickenburger opened this issue Apr 29, 2022 · 3 comments
Open

OAuth Error on User Login #25

micchickenburger opened this issue Apr 29, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@micchickenburger
Copy link
Member

InternalOAuthError: Failed to obtain access token
--
  | at Strategy.OAuth2Strategy._createOAuthError (/app/node_modules/passport-oauth2/lib/strategy.js:408:17)
  | at /app/node_modules/passport-oauth2/lib/strategy.js:175:45
  | at /app/node_modules/oauth/lib/oauth2.js:191:18
  | at ClientRequest.<anonymous> (/app/node_modules/oauth/lib/oauth2.js:162:5)
  | at ClientRequest.emit (node:events:527:28)
  | at TLSSocket.socketErrorListener (node:_http_client:454:9)
  | at TLSSocket.emit (node:events:527:28)
  | at emitErrorNT (node:internal/streams/destroy:157:8)
  | at emitErrorCloseNT (node:internal/streams/destroy:122:3)
  | at processTicksAndRejections (node:internal/process/task_queues:83:21)

@krishmaj krishmaj added the bug Something isn't working label Apr 29, 2022
@micchickenburger
Copy link
Member Author

This occurs on first login for a user

@krishmaj
Copy link
Collaborator

krishmaj commented Dec 12, 2022

With @micchickenburger 's addition of debug messaging (#113), I now get the following:

ERROR: {"name":"InternalOAuthError","message":"Failed to obtain access token","oauthError":{"errno":-3001,"code":"EAI_AGAIN","syscall":"getaddrinfo","hostname":"dunedb-prod.us.auth0.com"}} undefined undefined

when doing a new login to production. Would seem to emanate from

if (err) return res.send(`ERROR:\n\n${JSON.stringify(err)}\n\n${JSON.stringify(user)}\n\n${JSON.stringify(info)}`);

krishmaj added a commit that referenced this issue Jan 22, 2023
- see issue #25
- workaround implements a manual redirection back to the homepage when a callback error is encountered
@krishmaj
Copy link
Collaborator

krishmaj commented Feb 5, 2023

@micchickenburger Your suggested workaround seems to have at least stopped the error from impacting users, at least from my (admittedly low usage) testing. We've asked the users to keep an eye out for any re-occurrences. And we should keep this issue open as a reminder that we still need to, at some point, address it properly with a refactoring of the entire authentication system.

@krishmaj krishmaj changed the title OAuth Error on Server Startup OAuth Error on User Login Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants