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

LTC: InternalOAuthError: Failed to obtain access token #968

Closed
jirik opened this issue Dec 6, 2023 · 0 comments
Closed

LTC: InternalOAuthError: Failed to obtain access token #968

jirik opened this issue Dec 6, 2023 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@jirik
Copy link
Member

jirik commented Dec 6, 2023

On some servers with not-so-secure SSL configuration, Layman Test Client (LTC) fails during authentication with error

InternalOAuthError: Failed to obtain access token
    at OAuth2Strategy._createOAuthError (/code/node_modules/passport-oauth2/lib/strategy.js:423:17)
    at /code/node_modules/passport-oauth2/lib/strategy.js:177:45
    at /code/node_modules/oauth/lib/oauth2.js:191:18
    at ClientRequest.<anonymous> (/code/node_modules/oauth/lib/oauth2.js:162:5)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:496:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
_app.js getInitialProps
_app.js constructor pageProps={"num_authn_providers":1}

or

Failed to obtain access token:  Error: write EPROTO B84BF55A1D7F0000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:../deps/openssl/openssl/ssl/statem/extensions.c:921:

    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16) {
  errno: -71,
  code: 'EPROTO',
  syscall: 'write'
}
InternalOAuthError: Failed to obtain access token
    at OAuth2Strategy._createOAuthError (/code/node_modules/passport-oauth2/lib/strategy.js:426:17)
    at /code/node_modules/passport-oauth2/lib/strategy.js:179:36
    at /code/node_modules/oauth/lib/oauth2.js:191:18
    at ClientRequest.<anonymous> (/code/node_modules/oauth/lib/oauth2.js:162:5)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:496:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

It seems to have the same cause as #798.

LTC uses Node.js v18 since Layman 1.19.0, so probably all Layman versions from 1.19.0 to 1.22.2 are affected.

@jirik jirik added the enhancement New feature or request label Dec 6, 2023
@jirik jirik added this to the Release v1.23 milestone Dec 6, 2023
@jirik jirik closed this as completed Dec 6, 2023
@jirik jirik mentioned this issue Dec 6, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant