Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have implemented the validation for the new users using firebase. #76

Merged
merged 4 commits into from
Oct 5, 2024

Conversation

razputshivanshu
Copy link
Contributor

@razputshivanshu razputshivanshu commented Oct 4, 2024

Description

Implemented validation for new users to prevent unauthorized access to the website. This update enhances security by ensuring that only authorized users can proceed to access restricted parts of the application.

Related Issue

Link to the issue this PR addresses (if applicable):

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Other (please describe):

Checklist

  • I have read the contributing guidelines.
  • I have followed the code style of this project.
  • My code implements the changes requested in the issue.
  • I have added tests to cover my changes (if applicable).
  • I have updated the documentation (if necessary).
  • This PR is ready for review.

Additional Notes

Any other information that reviewers should know about this PR.
Make sure before running this code, enable these settings from Firebase console:
Authentication > Sign In method > Enable Email/Password & Email link (passwordless sign-in)

I have tested this code from my end, and the video is here:
The video size was big, so I am linking the google drive link:
https://drive.google.com/file/d/1eq1Y7-4DFETrgCslIIlzIP6eoD_YvLQg/view?usp=sharing

If you have any questions or need clarification, please feel free to ask in the issue comments. I’ll be available for an open discussion.

I hope you enjoyed my first contribution to the open-source project. If you liked my work, I would greatly appreciate it if you could tag this issue as level 3. It would be very helpful for me.

Copy link

vercel bot commented Oct 4, 2024

@razputshivanshu is attempting to deploy a commit to the Akshay Patel's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Thank you for your contribution! Your pull request has been submitted successfully. A maintainer will review it as soon as possible. We appreciate your support in making this project better

Copy link

vercel bot commented Oct 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
qr-code-generator ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 5, 2024 6:37am

@VesperAkshay
Copy link
Owner

The code is working fine but it always ask for verification while login that is not a good idea email verification should be done on registration at time of login you can add a captcha

@razputshivanshu
Copy link
Contributor Author

Could you explain it in a bit more detail or add some screenshots? That would be really helpful. Any suggestions on how I can improve it?

@VesperAkshay
Copy link
Owner

The email verification works on login every time a user login
Screenshot (125)
But the email verification should work while the user is registering

If every time user has to verify for login it will be very hectic

@razputshivanshu
Copy link
Contributor Author

I understood. I will try to fix this in next 1-2 days.

@VesperAkshay
Copy link
Owner

Okay

@razputshivanshu
Copy link
Contributor Author

It seems like the issue might be related to logging in with an account created before the verification feature was implemented, which could be why the verification prompt appears. On my end, I can log in without needing verification.

Here’s what I suggest to troubleshoot further:

Test 1: Try creating a new account, validate it, and then log in to see if the same issue persists. If it does, let me know, and I’ll look into it further.

If the application hasn’t been launched for real users yet, consider resetting the database to start fresh. This will clear all user data, allowing the process to function smoothly. Alternatively, you could write a JS query to trigger validation emails for existing users.

Here’s the link I used for testing on my end:
https://drive.google.com/file/d/1OwTwmOmmbItvft_w5yHBQm2-EeRj0wxp/view?usp=sharing

@VesperAkshay
Copy link
Owner

Okay I will into this and try to resolve this issue

@VesperAkshay
Copy link
Owner

One more thing in your code while registering the registration form does not have register with google option

@razputshivanshu
Copy link
Contributor Author

One more thing in your code while registering the registration form does not have register with google option

Ooky I missed that by mistake, I will fix that.

@VesperAkshay
Copy link
Owner

Okay

@VesperAkshay
Copy link
Owner

and if the user is old then the prompt comes for verification but for old accounts they don't email for verification

@razputshivanshu
Copy link
Contributor Author

One more thing in your code while registering the registration form does not have register with google option

I have updated that, you can check

@VesperAkshay
Copy link
Owner

Remove your api from the env file

@razputshivanshu
Copy link
Contributor Author

and if the user is old then the prompt comes for verification but for old accounts they don't email for verification

yes, that's the catch because many users has already login before the validation. Wait I will look for something so that user's who already have account can validate their emails.

@razputshivanshu
Copy link
Contributor Author

Remove your api from the env file

ooh sorry my bad

@razputshivanshu
Copy link
Contributor Author

Sir, I have fixed validation for old users issue. Can you check it once?

@VesperAkshay
Copy link
Owner

All the changes are good
Nice work

@VesperAkshay VesperAkshay merged commit 7262297 into VesperAkshay:main Oct 5, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Email verification is missing from the Sign-up page.
2 participants