papermark icon indicating copy to clipboard operation
papermark copied to clipboard

[🕹️] API Call Triggered Despite Empty Email Field During Authentication

Open HarshTiwari-err opened this issue 1 year ago • 15 comments

What side quest or challenge are you solving?

What side quest or challenge are you solving?

During the authentication process, clicking the "Continue with Email" button triggers an API call even when the email field is left empty. This behavior should be prevented to improve the user experience and avoid unnecessary API requests.

Steps to Reproduce:

Navigate to the login page. Leave the email field empty. Click the "Continue with Email" button. Check the network tab for api calls. Expected Behaviour:

The "Continue with Email" button should be disabled or an error message should be displayed when the email field is empty, preventing the API call from being triggered. All authentication buttons should be disabled while an authentication request is ongoing.

Actual Behavior: An API call is triggered, even though the email field is empty.

Potential Impact:

Unnecessary API requests.

Currently:

https://github.com/user-attachments/assets/9581612b-b8d1-417e-9e4d-715dc817b4a7

How it should be:

https://github.com/user-attachments/assets/fc038f80-58ba-43cf-b1c9-cc61784338ee

Points

?

Description

Why the problem is occuring? Since we are using the form type with submit button. Input field with type{email} is not handled. So we will explicitly handle the situation.

Provide proof that you've completed the task

This code will handle the email field and also disable the button while one authentication method is in progress with error handling.

HarshTiwari-err avatar Oct 10 '24 18:10 HarshTiwari-err

/attempt

poswalsameer avatar Oct 10 '24 18:10 poswalsameer

/assign

Mdmehedihasanrifat avatar Oct 10 '24 18:10 Mdmehedihasanrifat

Assigned to @Mdmehedihasanrifat! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀

oss-gg[bot] avatar Oct 10 '24 18:10 oss-gg[bot]

Bug Fixed in this PR.

HarshTiwari-err avatar Oct 10 '24 19:10 HarshTiwari-err

@Mdmehedihasanrifat I was already working on it.

HarshTiwari-err avatar Oct 10 '24 19:10 HarshTiwari-err

/assign

Anurag-Singh-Yadav avatar Oct 10 '24 23:10 Anurag-Singh-Yadav

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 10 '24 23:10 oss-gg[bot]

/assign

amith-webdeveloper avatar Oct 11 '24 03:10 amith-webdeveloper

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 11 '24 03:10 oss-gg[bot]

/assign

Kartik-Gangil avatar Oct 11 '24 03:10 Kartik-Gangil

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 11 '24 03:10 oss-gg[bot]

/assign

THECHAMP95821 avatar Oct 11 '24 12:10 THECHAMP95821

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 11 '24 12:10 oss-gg[bot]

/assign

DetrojaRadhey avatar Oct 12 '24 07:10 DetrojaRadhey

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 12 '24 07:10 oss-gg[bot]