Sanchitbajaj02 / palettegram

A social media app to get designs and color palettes for designers by designer.
https://palettegram.vercel.app
MIT License
60 stars 96 forks source link

Feat: By-pass email verification on development environment #404

Closed vinayak-vohra closed 3 months ago

vinayak-vohra commented 4 months ago

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

github-actions[bot] commented 4 months 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'

Sanchitbajaj02 commented 4 months ago

Hi @vinayak-vohra Can you explain me your proposal on how you are going to implement it?

vinayak-vohra commented 4 months ago

@Sanchitbajaj02 sure.

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.

vinayak-vohra commented 4 months ago

@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.

github-actions[bot] commented 3 months ago

Hello @vinayak-vohra! Your issue #404 has been closed. Thank you for your contribution!