Confirm Your Email Component - PropelAuth Docs

Confirm Your Email Component

PropelAuth's Confirm Your Email component is perfect for showing to users after they signup when email confirmations are enabled. It also allows your users to request an additional confirmation email if the first is not delivered. It is designed to be used when your user has a Login State of EMAIL_NOT_CONFIRMED_YET.

We highly recommend reviewing the Login and Signup Guide if using any of our login or signup components.

Confirm your email

You should receive an email with a link to confirm your email address within the next few minutes. If you do not receive an email, make sure to check your spam.

Resend confirmation email


Shadcn Installation

Install this component from our shadcn registry.

npx shadcn@latest add https://components.propelauth.com/r/confirm-your-email.json

Reference APIs

These are the APIs that are used by the above component. You can use these APIs directly in your own code.

resendEmailConfirmation

Sends another confirmation email to the logged in user.

Response Functions

The response object has a handle function that you can use to handle the response. These functions can be async, and you can return values from them.

Request

const { resendEmailConfirmation } = useAuthFrontendApis()

const response = await resendEmailConfirmation()
response.handle({
    success() {
        console.log('Confirmation email resent')
    },
    rateLimited(error) {
        console.error('Rate limited', error.user_facing_error)
    },
    emailAlreadyConfirmed(error) {
        console.error('Email already confirmed', error.user_facing_error)
    },
    unexpectedOrUnhandled(error) {
        console.error('Unexpected or unhandled', error.user_facing_error)
    },
})

Successful Response

{}