Open krayush opened 2 years ago
@krayush What version of node are you using? (node --version
).
And as far as repro steps are concerned, you simply created an express app with the specified ExpressOIDC
instance and this error was thrown on start up?
@jaredperreault-okta Thanks for quick reply! Much appreciated.
Node version: Node 16.x
This was throwing error with the full implementation as well but I tried debugging and zeroed it down to instance creation.
This might help with your investigation. I tried with Node 12.x and it seems to be working fine! Facing this issue only on Node 16.x
@krayush Can you provide the specific version installed that is causing problems? The ^
syntax will install versions >=4.0.1.
yarn why @okta/okta-oidc-middleware
or npm list @okta/okta-oidc-middleware
should output the specific version installed
The version installed is "4.0.1" from yarn.lock file:
Can you try upgrading to the latest version (4.5.1)? So far I have been unable to repro this
I thought of it as the first solution but that didn't work! I did try it again today but facing the same issue again.
It would be helpful if you could provide a sample repo where the error occurs because I have been unable to reproduce this issue locally. In the meantime, we will continue to investigate this internally
Internal Ref: OKTA-505604
@krayush Are you still experiencing this issue? I have been unable to repro this in node 16.15.1
with our test apps
Yes! I still have the same issue and its still not resolved! We are doing our current rollouts via hack by downgrading the NodeJS version to 12.x Quick question: Are you using https endpoint for OKTA for your test app?
Describe the bug?
Getting this issue in NodeJS code
GotError [RequestError]: Protocol "https:" not supported. Expected "http:" at get (/app/server/node_modules/got/source/request-as-event-emitter.js:236:15) at Immediate. (/app/server/node_modules/got/source/request-as-event-emitter.js:305:10) {
code: 'ERR_INVALID_PROTOCOL',
What is expected to happen?
No error should come here and the package should support https as well.
What is the actual behavior?
As of now the server fails to initialise because of this issue.
Reproduction Steps?
Shared in the
Describe the bug?
sectionSDK Versions
Using this: "@okta/oidc-middleware": "^4.0.1",
Execution Environment
const oidc = new ExpressOIDC({ issuer: 'https://okta.*****.com', client_id: 'CLIENT_ID', client_secret: 'CLIENT_SECRET', redirect_uri:
https://www.*****.com/authorization-code/callback
, scope: 'openid offline_access', appBaseUrl: basePath, sessionKey: 'oktaSession', });Additional Information?
No response