Email Verification
When enabled, new users receive a verification email after registration. They cannot log in until their email is confirmed.
Enable verification
In your project’s auth settings (dashboard → Auth → Configuration), toggle Require email verification. Once enabled, signUp returns requiresVerification: true and no token is issued.
Handle in your app
import { useAuth } from '@aerostack/react'
function RegisterFlow() {
const { signUp } = useAuth()
const [needsVerification, setNeedsVerification] = useState(false)
const handleRegister = async () => {
const result = await signUp(email, password, { name })
if (result.requiresVerification) {
setNeedsVerification(true)
}
}
if (needsVerification) {
return <VerificationPending email={email} />
}
// ...
}Verify from email link
The verification link in the email points to your app with a ?token= query param. Handle it:
// In your /verify-email page
import { useAuth } from '@aerostack/react'
import { useSearchParams } from 'react-router-dom'
function VerifyEmailPage() {
const { verifyEmail } = useAuth()
const [params] = useSearchParams()
useEffect(() => {
const token = params.get('token')
if (token) {
verifyEmail(token).then(() => {
// Email verified — redirect to app
})
}
}, [])
}Resend verification email
const { resendVerificationEmail } = useAuth()
await resendVerificationEmail('[email protected]')⚠️
Resend is rate-limited to prevent abuse. If the user does not receive the email, check your spam folder or contact support.
Configure the verification email
The verification email template (sender name, subject, body) is configurable in your project dashboard under Auth → Email Templates.