Add email verification nudge component to dashboard - #34
Conversation
Shows a dismissible yellow banner on all dashboard pages when the logged-in user's email is not verified. Includes a "Resend email" button that calls authClient.sendVerificationEmail() with success and error feedback. Converts dashboard layout to Options API. https://claude.ai/code/session_01TWXA6GHDVkZLT1hfDwVoEB
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8204282b25
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| await authClient.sendVerificationEmail({ | ||
| email: this.userEmail, | ||
| callbackURL: '/dashboard', | ||
| }) | ||
| this.successMessage = 'Verification email sent!' |
There was a problem hiding this comment.
Check sendVerificationEmail result before showing success
authClient.sendVerificationEmail does not throw on API failures by default (the client in lib/auth-client.ts does not enable fetchOptions.throw), so this try/catch path marks the action as successful even when the backend returns an error (for example rate limiting or mail delivery failure). In that case successMessage is set and the resend button is hidden (v-if="!successMessage"), which misleads users and prevents retrying from the banner.
Useful? React with 👍 / 👎.
Summary
This PR adds an email verification nudge component that prompts users to verify their email address before accessing all features. The nudge is displayed in the dashboard layout and provides a seamless way for users to resend verification emails.
Key Changes
New Component: Created
EmailVerificationNudge.vuecomponent that:Dashboard Layout: Integrated the new nudge component into the dashboard layout, positioned at the top of the main content area
Task Completion: Removed "Email verification nudge" from TODO.md as this feature is now implemented
Implementation Details
authClientto fetch session data and send verification emailshttps://claude.ai/code/session_01TWXA6GHDVkZLT1hfDwVoEB