You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
Currently, the project includes signin and logout functionality but lacks a signup feature. A signup page is essential for new users to create accounts. To enhance security, I propose implementing email verification during the signup process.
Frontend:
Develop a signup form with fields for email, username, and password.
Integrate form validation using React and Zod.
Backend:
Create a signup route that handles new user registration.
Use bcrypt for password hashing and Prisma for database interaction.
Implement email verification using Resend, sending a verification email upon signup.
Store a verification code in the database with an expiration timestamp.
Add validation for user input to prevent invalid data submission.
Security:
Integrate JWT for generating secure tokens.
Implement checks to ensure the user verifies their email before gaining full access to the application.
The text was updated successfully, but these errors were encountered:
Turbocell is using next-auth heavily, we don't need extra sign up next-auth takes care of it, sign-in creates an account if does not already exist in the database.
We need to implement a /profile page to handle email verification. Since next-auth manages sign-ups and sign-ins, our focus is on allowing users to verify their email addresses post-login with OAuth (Google/Discord).
On the /profile page, provide an option for users to request email verification. This will involve sending a verification email to the user. Once the user verifies their email, update the emailVerified field in the database (emailVerified DateTime?) to reflect this change. A null value indicates that the email has not been verified yet.
Ensure that after verification, the emailVerified field is populated with the current date and time to confirm successful verification.
https://github.com/me-imfhd/turbocell/blob/main/packages/db/prisma/schema.prisma#L65
You can query this to check user is verified or not.
me-imfhd
changed the title
Add Signup Feature with Email Verification
Add Profile Page and Email Verification
Aug 30, 2024
Description:
Currently, the project includes signin and logout functionality but lacks a signup feature. A signup page is essential for new users to create accounts. To enhance security, I propose implementing email verification during the signup process.
Frontend:
Backend:
Security:
The text was updated successfully, but these errors were encountered: