cloudfront-auth icon indicating copy to clipboard operation
cloudfront-auth copied to clipboard

Issues configuring auth with google

Open EstebanMDQ opened this issue 6 years ago • 5 comments
trafficstars

I configured a website according to the documentation using Google to authenticate and now I'm getting this error after I sign in to my account.

The Lambda function returned invalid json: The json output must be an object type. 
If you received this error while trying to use an app or access a website, please contact the provider or website owner for assistance. 
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by following steps in the CloudFront documentation (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-502-bad-gateway.html). 
Screenshot 2019-05-03 18 13 07

has this ever happened to you?

Thank you!

EstebanMDQ avatar May 03 '19 21:05 EstebanMDQ

Hmmm... the first thing would be to check the logs to see where in the process this happened. I've had 502 errors before, but I don't recall this specifically.

payton avatar May 03 '19 23:05 payton

AFAIK there were no logs at all. I finally run the build script again with different options and worked fine. the options that did't work for me was to authenticate against google and provide a list of valid emails.

EstebanMDQ avatar May 05 '19 04:05 EstebanMDQ

I see. I will have to give that method a closer look. Admittedly, that one doesn't get as much attention as the others, so it's possible there's an issue there.

If you enable logs, you should see some form of output in CloudWatch for the corresponding log stream.

payton avatar May 05 '19 16:05 payton

We are having the same error when using the list of valid emails in Google Authentication Errors from the lambda logs are:

 2019-06-18T10:07:25.762Z	57428f26-843e-402c-b169-5730db1e12f3	(node:1) UnhandledPromiseRejectionWarning: TypeError: callback is not a function
at internalServerError (/var/task/index.js:350:3)
at /var/task/auth.js:13:7
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
2019-06-18T10:07:25.762Z	57428f26-843e-402c-b169-5730db1e12f3	(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 16)

Isaacpm avatar Jun 18 '19 10:06 Isaacpm

This is an old thread, but I just hit this issue with a specific user, did you ever have an answer as to what caused this @Isaacpm

ghost avatar Nov 02 '20 21:11 ghost