frappe / hrms

Open Source HR and Payroll Software
https://frappe.io/hr
GNU General Public License v3.0
1.39k stars 732 forks source link

Login Failure with 2FA Enabled in HRMS PWA (Mobile App) #1865

Closed vova-sl closed 4 months ago

vova-sl commented 5 months ago

Information about bug

Summary

Users are unable to log in to HRMS when two-factor authentication (2FA) is enabled. The login button becomes disabled after entering the email and password, preventing access.

Steps to Reproduce

1.  Navigate to the HRMS login page.
2.  Enter a valid email address and password for an account with 2FA enabled.
3.  Observe that the login button becomes disabled, and the 2FA step is not prompted.

Results

Expected Result: Users should be prompted to complete the 2FA step after entering their email and password, allowing them to log in successfully.

Actual Result: The login button becomes disabled after entering the email and password, and the 2FA step is not initiated, preventing the user from logging in.

Network Details

•   The network request for login includes a verification object with the method OTP App and setup: true.
•   Temporary ID (tmp_id) is also present in the request payload.

Screenshots

1.  Login screen with email and password entered, showing the disabled login button.
2.  Developer tools showing the network request and response, indicating the 2FA method setup.
Frappe HR 2024-06-04 14-39-28

Additional Information

This issue is specific to users who have enabled two-factor authentication. The 2FA step seems to be missing or not implemented, causing the login process to fail.

Module

HR

Version

•   Frappe Version: 15.26.0
•   HRMS Version: 15.20.3
•   ERPNext Version: 15.23.0

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

No response

Code of Conduct

ruchamahabal commented 4 months ago

https://github.com/frappe/hrms/pull/1923