Closed vinayak-vohra closed 1 month ago
Congratulations, @vinayak-vohra! 🎉 Thank you for creating the issue. Your contribution is greatly appreciated and we look forward to working with you to resolve the issue. Keep up the great work!
'We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our Contributing Guidelines'
Hi @vinayak-vohra Can you explain me your proposal on how you are going to implement it?
@Sanchitbajaj02 sure.
NODE_ENV
we can check the mode i.e., 'development' or 'production'.middleware.ts
we have checks to redirect to homepage if user is not verified. We can add another condition to check for the environment and only redirect when in production mode.When starting the server in dev mode using yarn dev
, no verification email is sent, and the middleware logic allows access to site without the need of verification.
When starting the server in production mode by yarn build
and yarn start
, the site will behave as it currently is.
@Sanchitbajaj02 I just found a better approach. When creating user account after register, set the isVerified
attribute as true when in development environment. We won't need to change anything in the middleware.
Hello @vinayak-vohra! Your issue #404 has been closed. Thank you for your contribution!
What feature?
Currently email verification is required even in development environment. This creates hinderance when developing & testing features which require multiple accounts. (such as like, comments etc.)
I propose we bypass the email verification in development environment and use it only in the production environment. This will allow the developers to use any email on their local environment, improving developer experience and efficiency .
Add screenshots
No response
Record