Skip to content

EmailNotVerified component links to /email-verification without required query params #160

@henrylee746

Description

@henrylee746

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>
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions