however this doesn’t get trigger when a new user signs in and confirms his email address.
I’ve also double checked to make sure I have my HASURA_ADMIN env in Netlify.
Hey @oanaOM,
Thanks for that! This looks like a bug on our end. I’ve escalated to our engineering team but unfortunately can’t be sure when this will be fixed. The identity-login event-triggered function seems to be working as expected- would that work for you instead of identity-signup?
Thank @jen for getting back to me on this! Unfortunately, identity-login will not work for me as I want to create a new user in my db when someone signs up. I’ll look for other workarounds while this gets fixed.
We may have fixed this! Could you please try signing up as a new user to your Identity instance and let us know if your function is working better now? Please note that you’ll need to go through the full signup flow, not just make a request to your identity-signup function endpoint via curl, axios, etc.!
Thanks for you follow-up! I’ve just give it a try, created a new user by following the sign-up flow and still don’t see any logs in the identity-signup function on netlify. Please advice.
Hey @oanaOM,
What a bummer! Thanks for trying again. At this point, the only thing I can think of is that perhaps Identity event-triggered functions don’t work on branch deploys. Would it be possible to test this on your main branch or test the function on the main branch of another site?
Yes! One more idea to try, wish I would’ve thought of this earlier: you can create custom webhooks that are triggered on Identity events. Here’s where you would do this in the UI: https://app.netlify.com/sites/SITE_NAME/settings/identity#webhook
And then you would put in the URL of the Netlify function path there, like https://SITE_NAME.netlify.app/.netlify/functions/identity-login-manual-webhook. Please be sure to rename the function so it’s not one of the reserved names for automatically triggered Identity functions- you can just add -manual-webhook to the end.
Hi Jen,
I’m having this same issue with a small test build I’m doing (using Fauna though). I’m trying to use Identity-Fauna-Stripe for assigning roles now but it won’t work (email confirmations won’t trigger and then I eventually get failed to handle signup webhook” errors (when I delete my only member). When I don’t use Fauna/Stripe my sign-in works and redirects work (with manual assignment of role).
I think the issue is the webhook. I’m new to this so I don’t know where to put the URLs that you suggest. I tried in the webhook section of Settings and Usage but the # doesn’t work there so I’m sure I’m wrong about that. I’m willing to try anything at this point but some additional guidance about where these webhooks would live would be most helpful.
I’m not sure if that identity-signup file is not triggering OR if the code inside it isn’t right. I’m able to sign up but the roles still have to be input manually. When I sign up there’s no membership activity recorded on my Fauna or Stripe test sites. The schema.gql seems to work in Fauna but other than that no activity. Thank you!
Hi. I’m using the email sign-in (not 3rd party). Console.log() yielded nothing. However, I have 2 theories. I’ve moved the function folder around (and deleted it too). I think when it’s completely removed/unrecognizable it doesn’t fire at all but it also doesn’t interfere with Identity sign-up/log-in. When it’s in the right spot, however, it doesn’t fire and it interferes with Identity sign-up/login because i get the message “Email not confirmed.”
When I have the functions folder at root (screenshot in previous) I get this message in the functions log:
Kindly do not email our staff directly, that’s not an appropriate way to ask for support.
But coming back to your problem, the problem is because you’re using node-fetch version 3. That doesn’t support the require syntax anymore. You need to use version 2 or use the import syntax.
I have a site that is live where we use identity-signup in the exact same manner as the OP, with the difference that we are using FaunaDB. It’s been live for a long while and used to work just fine. Only recently I have noticed that anyone trying to sign up never gets an account created in our FaunaDB only in the Netlify identity.