RocketChat / RocketChat/Rocket.Chat

Inconsistent Login and Account Creation Behavior in Rocket.Chat login page

Open
#35,197 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

There are inconsistencies in the login and account creation process, particularly when using the "Sign in with Google" option and then attempting to log in using email/username and password. The following behaviors are observed:

  1. Sign in with Google (without setting a password)
    (already created an account and entered the username).

  2. Sign in with Google (after setting a password)

  3. Account Creation and Username/Email Handling Issues :
    ( note : This method is performed when I have already created an account using sign in with google and then I have tried to create an account)

Steps to reproduce:
  1. Go to the login page.

  2. Sign in using Google without setting a password.

  3. Try logging in using email/username.

  4. Observe the "User not found" error instead of a "No password set" error.

  5. Set a password and try logging in with email/username.

  6. Observe that the error "User not found" persists with no logs.

  7. Attempt to create an account with an existing username.

  8. Observe that the UI correctly shows "Username already exists."

  9. Attempt to create an account with an existing email but a unique username.

  10. Observe that the error message is unclear (Something went wrong. Please check your credentials. [403]).

Expected behavior:
  • When logging in with email/username without setting a password, the system should return an error indicating "This account doesn't have a password!" instead of "User not found."

  • When logging in after setting a password, authentication should succeed if credentials are correct; otherwise, an appropriate error should be displayed.

*If the email is already registered, the UI should clearly state "Email is already in use. Try a different email." instead of a generic error.

Actual behavior:
  • "User not found" error appears in cases where a "No password set" error is expected.

  • Logging in after setting a password still results in "User not found" with no logs.

  • The error message for duplicate email registration is unclear (Something went wrong. Please check your credentials. [403]).

Server Setup Information:
  • using open.rocket.chat
Client Setup Information
  • Desktop App or Browser Version: google and firefox
  • Operating System:Ubuntu 24.04.1 LTS
Additional context
Relevant logs:
  1. Sign in with Google (without setting a password):
    no logs generated.
  2. Sign in with Google (after setting a password):
    no logs are generated.
  3. Account Creation and Username/Email Handling Issues:
     ### Error Log from `verifyErrors.js:34` ```json { "success": false, "error": "Something went wrong. Please check your credentials. [403]", "errorType": 403, "user": { "name": "dummy", "email": "dummyId296@gmail.com", "username": "dum.dum.unique", "pass": "No_pass123." } } ``` 
Proposed fixes

🔹 Fix 1: Upon login using email/username and password without setting up the password should give me this account does not have a password
🔹 Fix 2: Ensure Authentication Works After Setting a Password .
🔹 Fix 3: Improve Error Messages for Duplicate Email Registration

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the login page on open.rocket.chat and reproduce the Google sign-in, password login, and duplicate-email registration cases. Review the error reported at verifyErrors.js:34 and any available authentication logs. Done means each flow shows the specified password or duplicate-email message, and password login succeeds after a password is set.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, backend, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.