W
Wasp-lang•2mo ago
Juan

Getting 'Not Found' error after clicking email verification link.

Deploying manually. I've provided WASP_SERVER_URL environment needed by Wasp Auth. Verification url seems to be using the client url instead.
9 Replies
kapa.ai
kapa.ai•2mo ago
Hi @Juan. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The issue you're experiencing might be due to the incorrect setup of the WASP_WEB_CLIENT_URL environment variable. This variable should be set to the URL where your frontend app is running. The server needs to know about it to properly configure Same-Origin Policy (CORS) headers. If you're not sure what your client URL is yet, don't worry. You can set WASP_WEB_CLIENT_URL after you deploy your client. Also, ensure that you have correctly set up the email verification flow in your Wasp application. The clientRoute field in your emailVerification configuration should be set to the route that handles the process of taking a token from the URL and sending it to the server to verify the email address. Here is an example of how you can use the verifyEmail action for that:
import { verifyEmail } from 'wasp/client/auth'
...
await verifyEmail({ token });
import { verifyEmail } from 'wasp/client/auth'
...
await verifyEmail({ token });
Please refer to the following documentation for more details: - Environment Variables (https://wasp-lang.dev/docs/advanced/deployment/manually#environment-variables) - Email Verification Flow (https://wasp-lang.dev/docs/auth/email#email-verification-flow) - Email Verification Config (https://wasp-lang.dev/docs/auth/email#emailverification-emailverificationconfig-) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Juan, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Juan
Juan•2mo ago
Yes the WASP_WEB_CLIENT_URL was set for the front end
miho
miho•2mo ago
Could you please share relevant bits of your Wasp file?
Juan
Juan•2mo ago
I have found that the issue might be the routing or assets missing. I'm getting the 'Not Found' error for Email verification and Pricing pages. I manually set verification to true in DB so Log in works and routes to the Demo-app. Password reset page also works. Haven't changed any feature/functional code or routes so not sure why they aren't working.
Vinny (@Wasp)
Vinny (@Wasp)•2mo ago
which email provider are you using in your wasp file?
miho
miho•2mo ago
@Juan what would be useful, to see the contents of your .wasp/out/web-app/src/router.tsx file 🙂
Juan
Juan•2mo ago
SendGrid, but emails seem to be working.
Juan
Juan•2mo ago
Juan
Juan•2mo ago
I noticed the pricing routing works from the accounts page 'upgrade link', but not the header. Everything is out the box from the latest Wasp version. I'm wondering if my node and npm version may be the issue.
Want results from more Discord servers?
Add your server