Can a user sign up confirmation be done with a 6 digit code (instead of only magic link)?
I ask this because some users may be signing up on their phone but their email is on their computer or vice versa.
P.S. Thanks again for creating this! Best repo of the last 2 years IMO!
1 Reply
Hi @blueturtle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Thank you for your kind words about Wasp! I'm glad you find it valuable.
Regarding your question about using a 6-digit code for user sign-up confirmation instead of a magic link, Wasp doesn't currently have built-in support for this specific feature. However, it is possible to implement such a system with some custom code.
Based on the information from our knowledge sources, here's what we can say:
1. Wasp's default email authentication system uses magic links for email verification, as mentioned in the Email Authentication docs.
2. However, Wasp allows for customization of the sign-up process. You can create a custom sign-up action that implements your desired verification method, as described in the Username & Password Authentication docs.
3. To implement a 6-digit code verification system, you would need to:
- Generate a 6-digit code during sign-up
- Store this code securely (possibly in the User entity or a separate verification entity)
- Send the code to the user's email
- Create a custom verification page where the user can enter the code
- Verify the entered code against the stored code
4. This approach is similar to the phone verification method suggested in a Discord support thread, where a community member outlined steps for implementing phone verification.
To implement this, you would need to create a custom sign-up action and modify the email sending process to include the 6-digit code instead of a magic link. You would also need to create a custom verification page to handle the code input and verification.
Keep in mind that while this is possible, it would require more custom code and careful consideration of security implications. If you decide to implement this, make sure to handle the storage and verification of the codes securely.
If you need more detailed guidance on implementing this feature, you might want to reach out to the Wasp community for specific code examples or best practices.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @blueturtle, 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?