Password protection / basic auth not working with forms+ lambda

Hey,

We have a site at https://jwt-signup.netlify.app/ which uses a netlify form + a submission-created lambda to process the form data

We need to prevent public access to this webpage, so we have tried both simple password protection and the basic auth methods specified in the docs, however whenever these are enabled our lambda function does not get trigger on form submission. As soon as we turn these off everything works great again.

Is that expected behaviour?

Hi,

Yes, that’s expected. When using password protection, ALL requests must be authenticated. For basic-auth, have you tried doing something like this: Password protection | Netlify Docs?

Thanks - looks like I had the route for basic auth misconfigured, it seems to work fine now

1 Like