W
Wasp-langโ€ข4w ago
Conspyre

signup email not working

Standing up a new app, on the development machine, changed the port to 4000 to avoid conflict with Stripe CLI. Going through signup flow, nothing happens, no e-mail is sent, nothing is logged on the server giving a URL to complete authentication on dev.
20 Replies
kapa.ai
kapa.aiโ€ข4w ago
Hi @Conspyre. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in the knowledge sources, I can offer some insights and suggestions regarding your issue with the signup email not working in your Wasp application. 1. Email Verification in Development: In development mode, Wasp allows you to skip the email verification step. You can enable this by setting an environment variable in your .env.server file:
SKIP_EMAIL_VERIFICATION_IN_DEV=true

SKIP_EMAIL_VERIFICATION_IN_DEV=true

This setting is useful during development to avoid going through the email verification flow every time you sign up Email Verification Flow (https://wasp-lang.dev/docs/auth/email#email-verification-flow). 2. Email Provider Configuration: Make sure you have properly configured an email provider in your main.wasp file. For development purposes, you can use the Dummy provider, which logs emails to the console instead of actually sending them:
app Example {
...
emailSender: {
provider: Dummy,
}
}

app Example {
...
emailSender: {
provider: Dummy,
}
}

Providers (https://wasp-lang.dev/docs/advanced/email#providers) 3. Check Console Logs: If you're using the Dummy provider, check your server console logs. The emails should be logged there instead of being sent. 4. CORS Issues: Although not directly related to email sending, ensure that you don't have any CORS issues, especially since you mentioned changing the port. Make sure your .env.client file has the correct REACT_APP_API_URL pointing to your server URL Discord support thread (https://discord.com/channels/686873244791210014/1217758453326680095). 5. Verify Email Verification Setup: Ensure that you have properly set up the email verification in your main.wasp file:
emailVerification: {
clientRoute: EmailVerificationRoute,
}

emailVerification: {
clientRoute: EmailVerificationRoute,
}

Email Verification Flow (https://wasp-lang.dev/docs/auth/email#email-verification-flow) 6. Custom Signup Action: If you've implemented a custom signup action, make sure it's correctly calling the necessary functions for creating and sending verification emails Creating a Custom Sign-up Action (https://wasp-lang.dev/docs/auth/email#creating-a-custom-sign-up-action). If none of these suggestions resolve your issue, you might want to double-check your overall setup and consider joining the Wasp Discord channel for more specific help, as suggested in one of the knowledge sources Github Issue (https://github.com/wasp-lang/wasp/issues/1438). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Conspyre, 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?
Conspyre
ConspyreOPโ€ข4w ago
Ohhhโ€ฆ @kapa.ai it looks like the SaaS template is garbage. Looking at the mainm.wasp we find: emailVerification: { clientRoute: EmailVerificationRoute, getEmailContentFn: import { getVerificationEmailContent } from "@src/auth/email-and-pass/emails", }, passwordReset: { clientRoute: PasswordResetRoute, getEmailContentFn: import { getPasswordResetEmailContent } from "@src/auth/email-and-pass/emails", }, Looking in src/auth/email-and-pass there is no file called "emails", not a "emails.js" not a "emails.ts", so, I guess this does not work out of the box as advertised.
kapa.ai
kapa.aiโ€ข4w ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- I apologize for the confusion you're experiencing with the SaaS template. It seems you've encountered an issue with missing files in the template. Let me address this based on the information we have: You're correct that if the files mentioned in the main.wasp configuration are missing, the email verification and password reset functionalities won't work as expected. This appears to be an inconsistency in the template. However, it's worth noting that there might be a discrepancy between the template you're using and the most up-to-date version. According to one of our knowledge sources, there was a mention of an outdated SaaS template: Discord support thread (https://discord.com/channels/686873244791210014/1208366712450195466): "Ah it looks like you're using our outdated saas template! Have you done a lot of changes to the code? You should use https://opensaas.sh instead." Given this information, I would recommend the following steps: 1. Check if you're using the latest version of the SaaS template. The recommended source seems to be https://opensaas.sh. 2. If you're using an older version, consider updating to the latest template or starting a new project with the most recent version. 3. If you're already using the latest version and still encountering this issue, it would be worth reporting this as a bug to the Wasp team. You can do this through their GitHub repository or Discord channel. 4. As a temporary workaround, you could create the missing emails.js or emails.ts file in the src/auth/email-and-pass/ directory and implement the getVerificationEmailContent and getPasswordResetEmailContent functions. Here's a basic example of what these functions might look like:
export const getVerificationEmailContent = ({ verificationLink }) => ({
subject: 'Verify your email',
text: `Click the link below to verify your email: ${verificationLink}`,
html: `
<p>Click the link below to verify your email</p>
<a href="${verificationLink}">Verify email</a>
`,
})

export const getPasswordResetEmailContent = ({ passwordResetLink }) => ({
subject: 'Password reset',
text: `Click the link below to reset your password: ${passwordResetLink}`,
html: `
<p>Click the link below to reset your password</p>
<a href="${passwordResetLink}">Reset password</a>
`,
})

export const getVerificationEmailContent = ({ verificationLink }) => ({
subject: 'Verify your email',
text: `Click the link below to verify your email: ${verificationLink}`,
html: `
<p>Click the link below to verify your email</p>
<a href="${verificationLink}">Verify email</a>
`,
})

export const getPasswordResetEmailContent = ({ passwordResetLink }) => ({
subject: 'Password reset',
text: `Click the link below to reset your password: ${passwordResetLink}`,
html: `
<p>Click the link below to reset your password</p>
<a href="${passwordResetLink}">Reset password</a>
`,
})

This is based on the example provided in the Wasp documentation (https://wasp-lang.dev/docs/auth/email#emailverification-emailverificationconfig-). I apologize for the inconvenience, and I hope this helps you move forward with your project. If you continue to face issues, reaching out to the Wasp community or maintainers directly might be the best course of action. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Conspyre, 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?
Conspyre
ConspyreOPโ€ข4w ago
@kapa.ai tell the team to fix the template, this is advertised as "auth works out of the box", and, it doesn't. ๐Ÿ˜•
kapa.ai
kapa.aiโ€ข4w ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- I understand your frustration with the template not working as advertised. You're right that if something is promoted as working "out of the box," it should indeed work without additional configuration or troubleshooting. As an AI assistant, I don't have direct contact with the Wasp team. However, I can suggest a couple of ways you can bring this issue to their attention: 1. GitHub Issues: You can create a new issue on the Wasp GitHub repository. This is typically the best way to report bugs or suggest improvements. You can find their repository at <https://github.com/wasp-lang/wasp> (https://github.com/wasp-lang/wasp). 2. Discord Channel: Wasp has an active Discord community where you can report issues and get support. You can join their Discord server and post about this problem in the appropriate channel. 3. Official Documentation: If you found this template through their official documentation, you might want to leave a comment or feedback there as well, if that's possible. When reporting the issue, it would be helpful to provide details such as: - The version of Wasp you're using - The exact steps you took to set up the project - The specific errors or missing files you encountered Your feedback is valuable and can help improve the template for future users. Thank you for taking the time to report this issue. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Conspyre, 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?
VS
VSโ€ข4w ago
Strong choice to tell the wasp team the template is garbage while asking for help, but oh well! Not from the wasp team, but there is a emails.ts file, perhaps pull again? Also I'd probably not change any ports, just when you're starting up -- Auth, emails, stripe, CRUD, actions, webhooks, API, and so much more actually does work out of the box - wasp is pretty powerful, perhaps try again with a fresh git pull?
MEE6
MEE6โ€ข4w ago
Wohooo @Adam, you just became a Waspeteer level 5!
Sven
Svenโ€ข4w ago
Bro hahahahaha Did u set the provider to Dummy In main.wasp Also did you follow the steps in the guide If you dont follow these and change things (without actually being able to understand what happens because lack of skills) ofcourse it wont work Try only to change things if you understand the consequences, but you tou lack the experience/technical knowledge is really dont recommend changing things
Vinny (@Wasp)
Vinny (@Wasp)โ€ข4w ago
@Conspyre Hey. Did you install wasp and run wasp new -t saas as the docs suggest? If so, you'll find the emails.ts file in src/auth/email-and-pass/emails.ts
Vinny (@Wasp)
Vinny (@Wasp)โ€ข4w ago
There is also a prominent warning in the docs about the Dummy provider.
No description
Vinny (@Wasp)
Vinny (@Wasp)โ€ข4w ago
And it's probably best not to change the ports until you're more familiar with Wasp. The React client runs on localhost:3000 and the server on 3001. The stripe CLI shouldn't interfere with these... Let us know if you have any other questions ๐Ÿ˜‰
VS
VSโ€ข4w ago
Whoops hehe I'm not the OP, just wanted to step in and help a little An unrelated question, and i apologize to be a wheneta kiddo, but regarding the wasp auth implementation for a mobile app, end of Q4 would be doable? I'm so stoked to get it for a mobile app!
Vinny (@Wasp)
Vinny (@Wasp)โ€ข4w ago
@kapa.ai what plans does Wasp have to make mobile apps?
kapa.ai
kapa.aiโ€ข4w ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- Wasp is indeed considering the idea of supporting mobile app development. This is evident from several discussions on their GitHub repository. 1. In one GitHub issue (https://github.com/wasp-lang/wasp/issues/1088), the idea of Wasp being able to produce a mobile version of the app is discussed. The main technology to explore here is React Native, possibly with Expo. A user has even shared a simplified example of how to create an Expo app and make it interact with a Wasp backend. 2. In another GitHub issue (https://github.com/wasp-lang/wasp/issues/1475), the concept of Wasp supporting multiple clients, including mobile apps, is discussed. This could involve defining all clients in Wasp directly or providing SDKs that allow you to interact with basic functionality of your app via this SDK. 3. There's also a GitHub issue (https://github.com/wasp-lang/wasp/issues/1117) discussing the addition of support for Progressive Web Apps (PWAs) in Wasp. PWAs can operate offline and access device features like a native app, which would be a big step towards making Wasp apps multi-platform and usable on phones. However, it's important to note that these are currently ideas for the future and not yet implemented features. The Wasp team is actively exploring these possibilities and gathering feedback from the community. If you have specific requirements or ideas, you might want to join these discussions on their GitHub repository or Discord channel. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Vinny (@Wasp), 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?
miho
mihoโ€ข4w ago
@Adam @Sven thanks for stepping in ๐Ÿ™‚
miho
mihoโ€ข4w ago
@Adam there are some plans on experimenting with using Wasp auth with a mobile app / browser extensions / other 3rd party clients: https://github.com/wasp-lang/wasp/issues/1973
GitHub
Make Wasp Auth usable in external apps / services ยท Issue #1973 ยท w...
We have users that are building Wasp app, but they also have some other apps that they want to use the same auth system (Wasp Auth). For example, we had a user building a Unity game, and wanted to ...
VS
VSโ€ข4w ago
Yes! I definitively look at that issue many times a week - I'll just wait patiently ๐Ÿ™‚
Vinny (@Wasp)
Vinny (@Wasp)โ€ข4w ago
ah sorry. you have the same color default discord profile pic so I didn't realize you're not OP ๐Ÿ™‚
VS
VSโ€ข4w ago
I ain't no hater, love wasp and thank you so much for introducing me to cursor!
Vinny (@Wasp)
Vinny (@Wasp)โ€ข4w ago
You're welcome ๐Ÿ™‚
Want results from more Discord servers?
Add your server