JayPe
JayPe14mo ago

Unverify user email

In my mobile app , I initialize a user only with his email. Then I ask him to verify his email => zitadel api call Then to set up his phone number => zitadel api call Then to verify his phone number => zitadel api call Then to set his password => zitadel api call But if the user stop his account creation before setting his password, I need to "clear" his zitadel account and just keep his email as unverified. I try to use the update user endpoint, but there is nothing happening with it. So I'm doing 3 calls - Delete phone number (v2) - Change user email (v2) with a fake email (with the code returned to avoid sending email) - Change again user email (v2) with his email (without the code to make sure the user receive it) The bug : The thing is that by calling two times the change user email endpoint, I don't receive any email with the code. If I wait 3-4 seconds between both change email user endpoint call I receive the email. When both calls are done quickly one after the other, no email sent
7 Replies
JayPe
JayPeOP14mo ago
someone ? up
FFO
FFO14mo ago
Hm what version did you see that error? Did you see the error EMAIL-s9kfs in your stdout logs?
JayPe
JayPeOP14mo ago
In logs there is no error
JayPe
JayPeOP14mo ago
JayPe
JayPeOP14mo ago
JayPe
JayPeOP14mo ago
Ok I've found something OK, it's working for me. But there is a "bug" in zitadel when sending emails What I do is : change email with fake email (returnCode: {}) change email with good email When doing this I receive the email with the TOTP code (so everything right for my case) What is not working : change email with fake email => without returning code, so zitadel try to send email change email with good email In that case the second time I call the change email, I won't receive the email on the good email It's like zitadel crash and does not succeed to send the second mail as the first one is sent to a fake one
FFO
FFO14mo ago
Hm yeah that sounds not great, can you create an issue on GH for this? I think this needs deeper validation

Did you find this page helpful?