Bug
EmailNotVerified.tsx renders a link to /email-verification with no query parameters. The EmailVerificationPage component requires name and email to be passed as URL query params (set by SignupForm.tsx after signup) to populate the greeting and to know which email address to resend the verification to.
When a user clicks "Verify Email" from EmailNotVerified (shown e.g. at /payment), they land on /email-verification?name=&email=. The resend button then calls sendVerificationEmail({ email: \"\" }), which will fail or send to the wrong address, and the greeting shows "Hello ," with a blank name.
Fix
EmailNotVerified receives a session prop (or can read it from context). Use the session's email and name to construct the link:
href={`/email-verification?email=${encodeURIComponent(session.user.email)}&name=${encodeURIComponent(session.user.name)}`}
Reference
|
</p> |
|
<Button variant="outline" asChild> |
|
<Link href="/email-verification">Verify Email</Link> |
|
</Button> |
|
</div> |
|
); |
Bug
EmailNotVerified.tsxrenders a link to/email-verificationwith no query parameters. TheEmailVerificationPagecomponent requiresnameandemailto be passed as URL query params (set bySignupForm.tsxafter signup) to populate the greeting and to know which email address to resend the verification to.When a user clicks "Verify Email" from
EmailNotVerified(shown e.g. at/payment), they land on/email-verification?name=&email=. The resend button then callssendVerificationEmail({ email: \"\" }), which will fail or send to the wrong address, and the greeting shows "Hello ," with a blank name.Fix
EmailNotVerifiedreceives asessionprop (or can read it from context). Use the session's email and name to construct the link:Reference
JOCA/joca-app/src/components/EmailNotVerified.tsx
Lines 10 to 15 in 93206c3