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

Bug Fix for Login Input Field Auto-Suggestions and Phone Number Login Issue #1256

Conversation

SargunSinghSethi
Copy link

@SargunSinghSethi SargunSinghSethi commented Sep 18, 2024

Description

I encountered a significant bug in the login functionality of the CMS system, where users were initially allowed to log in using their phone number and password. This issue arises because of the email input field’s auto-suggestion feature, which interferes with the login process, particularly when users enter their phone number.

NOTE Changes are only Made to Signin.tsx rest were generated when doing commit and rest are just linted.

Video Solution

fix-emailSuggestions.mp4

Problem Overview:

  1. Initial System Behavior:
  • Users could log in either using an email and password or a phone number and password. However, many users initially registered with a phone number.
  • Around 33% of users, based on initial records, were logging in using their phone numbers instead of an email.
  1. Current Issue:
  • The email input field is now giving auto-suggestions based on whatever the user types, even if it's a phone number. For example, if someone types "999", it suggests "[email protected]" and other similar options, even though it's a phone number.
  • On mobile devices, these suggestions often overlap with the submit button, making it impossible for users to log in.
  1. Solution Implemented: To address this, I modified the behavior of the auto-suggestions feature in the email input field.
  • New Logic: Suggestions will only appear if the string entered contains the "@" symbol. If no "@" is present, the system will assume it's a phone number and prevent suggestions from appearing.
  • This fix ensures that when users type a phone number (e.g., "999"), no unnecessary email suggestions are shown, and users can log in smoothly.

Why This is Critical: This fix is crucial because:

  • A significant percentage of users (about 33%) rely on phone number login.
  • On mobile devices, the auto-suggestion overlay blocks critical UI elements, preventing users from completing the login process.

@hkirat @devsargam @siinghd @TanmayDhobale

@devsargam
Copy link
Collaborator

Doesn't matter much sir. We can ignore this for now.

@devsargam devsargam closed this Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants