fix: redirect to 404 page for invalid email verification token#9499
Conversation
|
@iamr-kumar is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
|
Thanks for the input. Also could you help me with how to get the strings translated? Or is it done by the maintainers? |
0498cf8 to
2dd949d
Compare
|
Updated the 404 page |
You just have to create string in english common/en.json file and use it like |
My point was if the translation to other languages is automated or not. But thanks anyway. I didn't need to create any new string as found some existing ones that fit the use case :) |
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
| const isCalcom = process.env.NEXT_PUBLIC_WEBAPP_URL === "https://app.cal.com"; | ||
|
|
||
| // In case of invalid email verification token, we intentionally redirect to 404 from the API | ||
| const isInvalidToken = router.asPath === "/404"; |
There was a problem hiding this comment.
@sean-brydon @Udit-takkar this is causing other 404 pages to show as invalid token when it's not the case. Will revert this PR.
There was a problem hiding this comment.
@zomars could you specify which pages (or pattern) are getting affected, as isInvalidToken should only be true when intentionally redirecting to 404, which I don't see being done from anywhere else.

What does this PR do?
Fixes #9469
Type of change
How should this be tested?
/api/auth/verify-email?token={some-invalid-token}Mandatory Tasks