Skip to content

Create Email Verification Success Page #424

@yusuftomilola

Description

@yusuftomilola

Description

Build a success page shown after user clicks email verification link, confirming their email is verified.

Requirements

Page Route: /verify-email?token=<token>

UI States:

Loading State (while verifying):

  • Loading spinner
  • Message: "Verifying your email..."

Success State:

  • Success icon (checkmark in circle)
  • Title: "Email Verified!"
  • Message: "Your email has been successfully verified"
  • User's email address displayed
  • "Continue to Dashboard" button (if logged in)
  • "Go to Login" button (if not logged in)
  • Countdown timer: "Redirecting in 5 seconds..."

Error State:

  • Error icon (X in circle)
  • Title: "Verification Failed"
  • Error message (token expired, invalid, or already used)
  • "Resend Verification Email" button
  • "Go to Login" link

Already Verified State:

  • Info icon
  • Title: "Already Verified"
  • Message: "This email is already verified"
  • "Go to Dashboard" or "Go to Login" button

Token Verification Flow

  1. Extract token from URL on page load
  2. Call verification API immediately
  3. Show loading state during API call
  4. Handle response (success/error/already verified)
  5. Display appropriate state
  6. Auto-redirect after 5 seconds

Technical Specifications

  • Use useEffect to trigger verification on mount
  • Extract token from URL query params
  • Call API: POST /api/v1/auth/verify-email
  • Use countdown hook for auto-redirect
  • Use Tailwind CSS for styling
  • Add success/error animations (optional: framer-motion)
  • Handle case when token is missing

Acceptance Criteria

  • Auto-verifies on page load
  • Loading state shows during verification
  • Success state displays after verification
  • Error states show appropriate messages
  • Resend email button works
  • Auto-redirect countdown works
  • Manual redirect buttons work
  • Page handles missing token gracefully
  • Page is responsive on all devices

Shared Design Guidelines

Color Scheme:

  • Success: Green (#10b981)
  • Error: Red (#ef4444)
  • Info: Blue (#3b82f6)
  • Primary: Emerald (#10b981)

Typography:

  • Titles: 2xl font, bold
  • Messages: base font, regular
  • Links: Primary color with underline on hover

Spacing:

  • Center content vertically and horizontally
  • Max width: 450px for forms
  • Consistent padding: 24px

Animations:

  • Fade in on page load
  • Button hover effects
  • Loading spinner rotation
  • Success icon scale animation

Accessibility:

  • ARIA labels on all inputs
  • Focus states on interactive elements
  • Keyboard navigation support
  • Screen reader friendly messages

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions