On email verification, add metadata

Hi

I’m interested in adding some specific metadata, following a users verification. While a proportion of users may well login after verification, almost 50% do not. But I still want to set this metadata.

So flow is:
1/. User is sent a verification email (periodic, not registration based verification)
2/. On clicking on the verification token in the email: app_metadata is set to be xyz (I do not want to set email_verfied as this can only be done once

Is there a way to do this?

Thanks in advance!

Hi @ahmad.ali,

Thank you for reaching out to us!

As you are working with a Verification Email, which is usually manipulates the email_verified attribute, you could instead create an additional attribute that works as a counter when the email is verified. The Post-Login Action could work in the way that on the first login after the verification email is actioned, the email is set to verified, the counter goes up by 1, then email_verified is set to false again. This way, you will have a way of seeing if the verification has gone through while maintaining the email_verified as false for your users.

You can find more information on our documentation here.

Hope this helps!
Gerald

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.