Auth0 & Cloudfront Lambda@Edge

Kia ora
I am looking for an official example of how to use Auth0 in an AWS Cloudfront Lambda@Edge.
I understand I need a SPA Auth0 application, but I am unclear on the lambda function’s code. I only found examples for AWS APIGateway.

I want to use Lambda@Edge as an authorizer for Cloudfront. When a user tries accessing a URL covered by Cloudfront, the lambda should check the cookies and run the Auth0 login flow if needed.

It would be awesome if there could be an official example, so I don’t need to mix and match the snippets one can find online.

Ngā mihi nui
Georg

Hi Georg,

Where you able to make it work ? If yes could you please share your code as example ? Thank you very much !

Evrard