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

"Invalid email address" when account already exists #3886

Open
4 tasks
rolodato opened this issue May 6, 2024 · 12 comments
Open
4 tasks

"Invalid email address" when account already exists #3886

rolodato opened this issue May 6, 2024 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@rolodato
Copy link
Contributor

rolodato commented May 6, 2024

How are you running Flagsmith

  • Self Hosted with Docker
  • Self Hosted with Kubernetes
  • SaaS at flagsmith.com
  • Some other way (add details in description below)

Describe the bug

In #1089, the signup logic was changed to return "Invalid email address" when trying to sign up a new account with an existing email address. This is a bug.

Steps To Reproduce

  1. Sign up to Flagsmith
  2. Try to sign up with the same email address again
  3. Error message is "Invalid email address"

Expected behavior

The error message should state that the account already exists, and maybe suggest that the user logs in instead. Trying to obfuscate this message is mostly security theatre and does not provide any real security benefit.

One alternative could be to allow the signup flow to continue if the account already exists, showing a message like "Check your email to proceed with signup". We could send an email to the user in this case saying that someone tried to sign up with their email, and suggest they log in instead. If their email does not already exist, send them a confirmation email. Note that Flagsmith does not currently send confirmation emails.

Screenshots

No response

@rolodato rolodato added the bug Something isn't working label May 6, 2024
@kyle-ssg kyle-ssg assigned kyle-ssg and unassigned kyle-ssg May 7, 2024
@utkarsh-1905
Copy link
Contributor

Hey, if you haven't solved this, can I take this up? I am looking to contribute to flagsmith, and this can be a good issue to start with

@dabeeeenster
Copy link
Contributor

Sure! Will assign!

@dabeeeenster
Copy link
Contributor

I prefer the "alternative" so we don't leak information here.

@utkarsh-1905
Copy link
Contributor

Yup, the alternative looks a better way to me too from a user point of view, will start working on it, thanks

@rolodato
Copy link
Contributor Author

rolodato commented May 8, 2024

I've clarified this now in the original issue - please note that Flagsmith does not currently send confirmation emails, so that approach will take a lot more work.

My opinion would be to go with the first approach for now. Being an open source project it doesn't make much sense to obfuscate the message - it's trivial to see that trying to sign up with a valid email and receiving "Invalid email address" means that the email is already registered, i.e. we're leaking the information anyway, just in a way that is confusing to customers. Later on we can implement the second approach.

@utkarsh-1905
Copy link
Contributor

understood

@utkarsh-1905
Copy link
Contributor

utkarsh-1905 commented May 10, 2024

Hey guys, to be on the same page, this is the exact error right?
Screenshot from 2024-05-10 10-55-50
Took me very long to setup the project, will be raising an issue to improve the contributing.md 🚀

@utkarsh-1905
Copy link
Contributor

Screenshot from 2024-05-10 13-02-33
Is this error message okay? or something else?

@dabeeeenster
Copy link
Contributor

Can we have Email already exists. Please Login.

@utkarsh-1905
Copy link
Contributor

okay done

@rolodato
Copy link
Contributor Author

Sorry for nitpicking - this should be Email already exists. Please log in., since "login" is not a verb or a proper noun.

utkarsh-1905 added a commit to utkarsh-1905/flagsmith that referenced this issue May 10, 2024
…or whenever

it encounters a duplicate user.

Signed-off-by: Utkarsh Tripathi <utripathi2002@gmail.com>
@utkarsh-1905
Copy link
Contributor

utkarsh-1905 commented May 10, 2024

opened a pr #3924 , ignore 21aa6c9 (irrelevant), i pushed it by mistake on my fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants