W
Wasp•3d ago
mb23

If the verification email goes to spam, how can I verify a user manually? (I'm using OpenSaaS)

How can I verify users manually in the database?
5 Replies
kapa.ai
kapa.ai•3d ago
Hi @mb23. 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 knowledge sources, there isn't specific information about manually verifying users in OpenSaaS or directly in the database when verification emails go to spam. However, I can provide some general information about Wasp's email verification system that might help. In Wasp, email verification works by setting an isEmailVerified flag on the user account. When a user signs up, this flag is set to false by default, and it gets set to true when they click the verification link in the email. You have a few potential options: 1. Development Environment Bypass: In development mode, you can skip email verification entirely by setting an environment variable:
SKIP_EMAIL_VERIFICATION_IN_DEV=true
SKIP_EMAIL_VERIFICATION_IN_DEV=true
in your .env.server file. This is useful for development but not recommended for production. Email Verification Flow 2. Resend Verification Email: One community member suggested that users can go through the "reset password" flow, which might also verify their email in the process. How do I resend an email verification email? 3. Custom Solution: You would likely need to create a custom admin interface or script that can directly update the isEmailVerified flag in your database for specific users. This would involve accessing your database directly, but there's no specific guidance in the provided knowledge sources on how to do this in OpenSaaS. If you're experiencing issues with emails going to spam, you might also want to review your email configuration and consider using a reputable email service provider to improve deliverability. For more specific guidance, you might want to reach out to the Wasp community on Discord with details about your setup, as suggested in one of the support threads: "We'll need more details to help you. Let's start with some screenshots and a link to your code (if you don't mind sharing it)." ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @mb23, 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?
toticozeni
toticozeni•2d ago
Hey, @mb23. It's possible to connect to your database directly through a postgres clients like pgAdmin, DBeaver and similar. In there you would look for that user's email provider and change the email verification flag to true. Do you need any additional instructions?
mb23
mb23OP•2d ago
@franjo Thanks for getting back to me 🙂 I've tried changed the isEmailVerified attribute to true in the AuthIdentity -> providerData Array but got this error message: duplicate key value violates unique constraint "AuthIdentity_pkey" Probably, I have to create a helper function that generates a new key, no?
toticozeni
toticozeni•2d ago
That's weird, you should be able to update it directly. I spun up local todoApp example to try it and managed. providerData is JSON so you should make sure it's still valid. The AuthIdentity_pkey should be refering to (providerName, providerUserId) composite key. Make sure you don't change anything in those columns. Only the providerData column.
No description
toticozeni
toticozeni•2d ago
@mb23

Did you find this page helpful?