Overview
Email verification is a two-step process:- Resend verification notification (if needed)
- Verify email address via signed URL
Resend Verification Notification
Endpoint
HTTP Method
API Endpoint
Authentication
This endpoint requires authentication (usesauth middleware).
Rate Limiting
- Maximum 6 requests per minute per user
- Throttle key: User ID
Request Body
No request body parameters required.Response
Status message indicating the verification link was sent.
Example Request
cURL
Next.js
Success Response
Error Responses
Already Verified (302)
If the email is already verified, redirects to dashboard:Unauthenticated (401)
Rate Limit Exceeded (429)
Verify Email Address
Endpoint
HTTP Method
API Endpoint
Authentication
This endpoint requires:- Authentication (
authmiddleware) - Signed URL (
signedmiddleware) - URL must be valid and not expired
Rate Limiting
- Maximum 6 requests per minute
- Throttle window: 1 minute
URL Parameters
The user’s ID.
SHA256 hash of the user’s email address.
Query Parameters
Unix timestamp when the signed URL expires.
HMAC signature to verify the URL hasn’t been tampered with.
Response
Redirects to the frontend dashboard with verification status.
Example Request
cURL
Next.js
Success Response
Redirects to frontend with verification confirmation:Error Responses
Already Verified (302)
If already verified, still redirects to dashboard:Invalid Signature (403)
Returned when the signed URL is invalid or expired:Unauthenticated (401)
Rate Limit Exceeded (429)
Notes
Verification Notification
- A verification email is automatically sent when a user registers
- Users can request a new verification email if the original expires or is lost
- The endpoint checks if the email is already verified before sending
- Rate limited to prevent abuse (6 requests per minute)
Email Verification
- Uses Laravel’s signed URLs for security
- URLs expire after a configured time period (default: 60 minutes)
- Upon successful verification, a
Verifiedevent is dispatched - The
email_verified_attimestamp is set on the user model - Users are redirected to the frontend dashboard after verification
- Frontend URL is configured via
config('app.frontend_url')
Integration with Next.js
- Configure
FRONTEND_URLin Laravel’s.envfile to match your Next.js app URL - Verification links in emails will point to your Laravel API
- After verification, users are redirected back to your Next.js frontend
- Check for the
?verified=1query parameter to show success message