oktadev / okta-nodejs-aws-lambda-example

Apache License 2.0
6 stars 4 forks source link

Deploying code to lambda fails #5

Open martinbowling opened 4 years ago

martinbowling commented 4 years ago

using okta instance https://dev-716546.okta.com I have deployed the code (which works locally) to lambda.

it is pushed to https://fqi83qcoof.execute-api.us-gov-east-1.amazonaws.com

The okta login is never displayed and it fails silently and displays {"message":"Not Found"} when going to the loginCallback route

martinbowling commented 4 years ago

START RequestId: 19e673fc-9387-44f0-9dc9-bc7c07e72df2 Version: $LATEST 2020-07-28T15:41:03.175Z 19e673fc-9387-44f0-9dc9-bc7c07e72df2 ERROR Unhandled Promise Rejection { "errorType": "Runtime.UnhandledPromiseRejection", "errorMessage": "RequestError: Request timed out", "reason": { "errorType": "RequestError", "errorMessage": "Request timed out", "code": "ETIMEDOUT", "name": "RequestError", "host": "matterhub-test.okta.com", "hostname": "matterhub-test.okta.com", "method": "GET", "path": "//oauth2/default/.well-known/openid-configuration", "protocol": "https:", "url": "https://matterhub-test.okta.com//oauth2/default/.well-known/openid-configuration", "stack": [ "RequestError: Request timed out", " at timeoutFn (/var/task/node_modules/got/index.js:333:53)", " at asPromise (/var/task/node_modules/got/index.js:411:18)", " at got (/var/task/node_modules/got/index.js:651:10)", " at Function.got.<computed> [as get] (/var/task/node_modules/got/index.js:669:31)", " at Object.get (/var/task/node_modules/openid-client/lib/http.js:15:14)", " at Function.discover (/var/task/node_modules/openid-client/lib/issuer.js:194:28)", " at Object.oidcUtil.createClient (/var/task/node_modules/@okta/oidc-middleware/src/oidcUtil.js:54:17)", " at new ExpressOIDC (/var/task/node_modules/@okta/oidc-middleware/src/ExpressOIDC.js:148:14)", " at Object.<anonymous> (/var/task/index.js:17:14)", " at Module._compile (internal/modules/cjs/loader.js:1133:30)" ] }, "promise": {}, "stack": [ "Runtime.UnhandledPromiseRejection: RequestError: Request timed out", " at process.<anonymous> (/var/runtime/index.js:35:15)", " at process.emit (events.js:310:20)", " at processPromiseRejections (internal/process/promises.js:209:33)", " at processTicksAndRejections (internal/process/task_queues.js:98:32)" ] }