is there a way to keep verification code active bu...
# ory-selfhosting
a
is there a way to keep verification code active but not send it at registration? i would like to send it myself if user clicks on verify button
e
You might be able to either use a webhook to do this or catch it in your smtp server.
a
using a webhook, you mean i should not use any other hook at all and create the user myself, provide the session and do all the other stuff that is happening myself (do not know what else is happening)? currently i have created the hooks i need for automatic verification of invited users without the need to verify manually. so at least that part worked fine.
e
a
@early-magician-18981 If I want to do this, I would need to deactivate the verification completely and implement my own logic. Thats a lot of responsibility to take from kratos. As I have said, I have implemented the auto verification with a post registration hook but the verification code is send anyway. it seems that the verification code “send” action is triggered before my post registration hook even runs/finishes. configuring the smpt (aws ses) to fetch only these cases would also not work since we cannot set separate headers for each email send via kratos. so basically I would have to leave that email as is and make it bad ux or clone kratos and remove that part from the code or add an attribute that allows to configure that conditionally.
Ok, i found a way. a little bit complicated but I now do this: setting can_interrupt to true, then return the verified state before creating the identity. made me change alot of things because i actually needed the identityId in the after hook but thankfully there is the external_id which can be used instead.