Auth0 Home Blog Docs

After changing user's email, no way to send them a verification email :(

verification-email

#1

Hello community, here is my scenario. Seems very typical to me but the inability to send the user a verification email thwarts my efforts:

  • user is created via a social account (e.g. google) - email is "foo@bar.com"
  • user later ‘signs up’ via an email account: "foo@bar.com", at this point these are 2 separate accounts
    ** user verifies their email & logs in, we link these 2 accounts - Google account (being the older account) is the master, the email account is a child account
  • we call the management-api and update the user’s email address on non-social connection to "baz@bar.com", works great. Auth0 also auto-sets the email_verified to false on that child account (great)

I’m now in a situation where this human user cannot be sent an email verification email :sob: If I call the “/jobs/verification-email” job and use the primary ID of this linked account (e.g. google|abc123) I get the error response: "400, bad request, ‘… main connection does not support this operation’ ". If I try to use the child account Id, then I get the error that the user does not exist (this API resource only accepts user_id & client_id).

So, this user, who has a valid account in auth0 (>1 accounts that are linked), cannot be sent an email verification email via Auth0. Am I missing something? Thanks


#2

After thinking about this a bit more, IMO, the Auth0 Management API’s “…/jobs/verification-email” resource should support “connection” as a (3rd) optional parameter, on top of the existing 2 parameters. This would provide the logic necessary to perform this job operation successfully, even in cases where the email address in question is on a child account in a linked account scenario.

As it stands, it appears that the scenario described above is effectively not supported.