-
Notifications
You must be signed in to change notification settings - Fork 15
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
'Unknown authentication strategy "oidc"' in AWS Lambda context #13
Comments
@kpeters-cbsi - Thanks for the report. Let me check with the team behind that sample repo and see if this issue is better handled there, and I'll report back. |
@kpeters-cbsi - Unfortunately, I don't have a lot of experience merging oidc-middleware with AWS Lambda (example notwithstanding), but this is what we were able to turn up: The issue might be the Passport middleware. This might help: jaredhanson/passport#651 (comment) or uploading the node_modules to Lambda: https://stackoverflow.com/questions/34437900/how-to-load-npm-modules-in-aws-lambda |
Serverless will take care of the NPM modules. So that I can test the Passport hypothesis, what URL should I try to access? The |
I can get out with my Lambda, but the issuer URL ( |
Yes, the issuer URL is the base for various urls that are actually hit. You can see the url use for the authorize call here: https://github.com/okta/okta-oidc-js/blob/master/packages/oidc-middleware/src/connectUtil.js#L76 There are a number of urls that are hit, so the above isn't the exhaustive list, but that should establish if the Passport fix will help you. |
I was able to hit |
Unfortunately that's the most information my team has at the moment - your issue (working from inside AWS Lambda) is outside the scope of this SDK itself. |
@kpeters-cbsi were you able to get this working? |
I'm submitting this issue for the package(s):
I'm submitting a:
Current behavior
I've deployed the Lambda sample app provided by Okta using Serverless Framework. While I can run the app locally, when I run it in Lambda, I get:
Expected behavior
When I access my app, I should be redirected to Okta for authentication
Minimal reproduction of the problem with instructions
Deploy my fork of the example with the following
.env
(properly redacted):Extra information about the use case/user story you are trying to implement
This is similar to okta/okta-oidc-js#68, but the solution suggested there, namely invoking
app.listen
on theoidc.ready
event, doesn't work as written in a Lambda context (the listening is being handled by API gateway, which calls the Lambda function with the contents of the HTTP request). I've tried converting the event to a Promise using promise.toolbox.fromEvent, but that causes my Lambda to throw an error.Environment
node -v
): AWS Lambda NodeJS 12.x runtimeThe text was updated successfully, but these errors were encountered: