422: Failed to handle signup webhook

Without replicating the project you are deploying, and using the same configuration (webhooks, etc.) as you, I am unable to replicate the issue.

Netlify’s Support Engineers (and others) are likely better placed at this point to assist you as they will have more insights based on experience (and log files too).

@coelmay I was able to find the root cause and solve my issue. I originally created a permissioned access control staging site for QA testing. I then password protected the site to ensure only people with the site password could access the site. I was really confused why my site was not working from the original example you shared and others I found online. I then realized the only difference between my site and others was that mine was password protected.

So what I did to test my hypothesis was made a deploy copy of goTrue demo site, and added a functions directory for a identity-validate.js event trigger.

Once the site was deployed I set a password and enable identity. I went to my deployed go true playground added the identity endpoint and tried the sign up flow. Guess What? The 422 response

I then decided to remove the password from the site and finally I got a 200 response and a log in my identity-validate function. All that to say, having a password protected site with identity enabled and a webhook identity function will cause a 422.

Reproduction steps

  1. deploy a copy of GoTrue to netlify
  2. add a functions dir with identity-validate.js similar to this public github repo
  3. set access control to the site
  4. enable identity
  5. copy identity api endpoint to the deployed site API endpoint input
  6. try initiating a sign up for a user

You should see a 422 response

1 Like

Great detective work @aoloo :netliconfetti:

The detailed trouble-shooting process you undertook is valuable for anyone else who may happen upon this same issue in the future. :netlisparkles:

2 Likes

thank you for being so helpful in this thread, @coelmay . congrats, @aoloo! glad its working now.

2 Likes