[Issue] Fixed customertoken not generating after configured failure in a row #34067
Closed
1 of 3 tasks
Labels
Area: APIs
Component: Integration
Fixed in 2.4.x
The issue has been fixed in 2.4-develop branch
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Priority: P1
Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.
Progress: done
Reported on 2.4.2
Indicates original Magento version for the Issue report.
Reproduced on 2.4.x
The issue has been reproduced on latest 2.4-develop branch
Severity: S1
Affects critical data or functionality and forces users to employ a workaround.
This issue is automatically created based on existing pull request: #34001: Fixed customertoken not generating after configured failure in a row
Description (*)
This pull request solves the issue when a customer has tried too many fail attempt (i.e more no of times than in the configuration)for generating the customer token via graphql or rest api. Then the customer is not able to log into the system ever.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
The issue was occuring because in the current system, there was no any check if
lock_expires_at
inoauth_token_request_log
is greater than current date time. So, the system always returns the no of failed attempts.For example, let's say, if the configured no of failed attempt is 6. And the customer has tried 7 times to generate the customer token via graphql api. Now, after the expiry time of
lock_expires_at
even when he/she tries with correct credentials, he/she is not able to generate the customer token and get the exception'The account sign-in was incorrect or your account is disabled temporarily. '

. 'Please wait and try again later.'
This is a major issue for the Scandi PWA login as customer is not able to logged into the PWA after trying too many unsuccessful attempt.
To resolve the issue, i have applied the check if
lock_expires_at
is greater than current date time. Then we got zero token in that case and when the customer login with correct credentials, he/she will log into the system.Please let me know if you need additional test cases (i have to make the test cases, lol) or any other description you want.
Contribution checklist (*)
The text was updated successfully, but these errors were encountered: