---
reference:
  json:
    - key: email_verification_required_error
      id: email_verification_required_error
      url: >-
        /reference/authkit/authentication-errors/email-verification-required-error
      title: email_verification_required
      sendsEmail: true
      properties:
        - key: code
          type: '"email_verification_required"'
          description: (authentication_errors.code)
        - key: message
          type: string
          description: (authentication_errors.message)
        - key: pending_authentication_token
          type: string
          description: (authentication_errors.pending_authentication_token)
        - key: email
          type: string
          description: (user.email)
        - key: email_verification_id
          type: string
          description: (email_verification.id)
originalPath: >-
  .tmp-workos-clone/packages/docs/content/reference/authkit/authentication-errors/email-verification-required-error.mdx
---

## Email verification required error

This error indicates that a user with an unverified email address attempted to authenticate in an environment where email verification is required. It includes a pending authentication token that should be used to complete the authentication.

<CodeBlock
  title="Email verification required error"
  referenceId="email_verification_required_error"
  file="email-verification-required-error"
/>

When this error occurs and the [email setting](/authkit/custom-emails) for email verification is enabled, WorkOS will automatically send a one-time email verification code to the user’s email address and issue a pending authentication token. If the email setting is not enabled, [retrieve the email verification code](/reference/authkit/email-verification/get) to send the email verification email yourself. To complete the authentication process, use the pending authentication token from the error and the one-time code the user received to [authenticate](/reference/authkit/authentication) them and to verify their email address.

The same applies when a user attempts to authenticate with OAuth or SSO, but there was already an account with a matching unverified email address.
