Auth0 Home Blog Docs

Your email address could not be verified

I am creating new users via the management API and on creation they are being sent a verification email which is great, however whenever a user clicks on the link on one of these emails they get an error page saying “Your email address could not be verified” despite this the email_verified flag does seem to be updated to true. Cant seem to find anything in the logs, would prefer the users of our system didnt see the failure message, keen to try and work out why they are getting it, any thoughts,

code used for creating users below

const newUser: CreateUserData = {
    email: 'someemail@somewhere.com',
    email_verified: false,
    password: 'S0mePa$$w0rd',
    connection: 'Username-Password-Authentication'
   
    app_metadata: { isJudge: true },
  }
  const result = (await auth0.createUser(newUser)) as User<UserAppMeta>

after creation i am also assigning them a role using

 await auth0.assignRolestoUser({ id: result.user_id }, { roles: [process.env.JudgeRoleId] })

any thoughts welcome