mkhorasani / Streamlit-Authenticator

A secure authentication module to validate user credentials in a Streamlit application.
Apache License 2.0
1.37k stars 229 forks source link

Email verification after registration #150

Closed harsh9898 closed 2 months ago

harsh9898 commented 2 months ago

Hey @mkhorasani

This package is awesome and it helps me and saves a lot of time and effort. Thank you so much for building such a great package.

One thing that I wanted to figure out is how can I make sure that the user is entering the email exists(no dummy emails). The reason I ask this is let's say some user has put abc123@gmail.com, it will accept and register the user. But I have implemented sending emails for reset password and forgot the user name. In those cases, they won't receive any emails as the email itself does not exist in the real world.

Can you please give me some idea on how to achieve this? If you can implement some way to verify the email address in register_user function then nothing like it.

Thank you, Harsh

mkhorasani commented 2 months ago

Hi @harsh9898, thank you for reaching out! I recommend that you pass your own customized validator object to the authenticate class to verify if the email exists. Please take a look at this package, and also please take a look at the way emails are verified in the validator class to implement your own version of it. Cheers!