Openbravo Issue Tracking System - POS2
View Issue Details
0057626POS2POSpublic2025-01-13 14:192025-01-21 09:09
asier_perez 
ignacio_deandres 
normalminoralways
closedfixed 
5
 
25Q2 
No
0057626: [25Q1] "Forgot Password?" button does not appear before the first log in
The "Forgot Password?" button from the log-in page does not appear before the first log in. The isOnline variable in line 295 from LoginForm.jsx is false before the first log in.

After logging in for the first time, the isOnline variable is set to true and the button appears, but it should appear also before that.
Configuration
1) Log in back-office
2) Go to Preference window
3) Search for 'Terminal Authentication enabled' and open it
4) Change its value to 'Y' and save
5) Go to Client window
6) Select the 'The White Valley Group' record
7) In the 'Information' sub-tab, check the 'Allow Users to Request a Password by Email', and save changes

Reproducing the issue
1) Go to POS2 (either with cache cleared or just after doing the configuration from above)
2) Type the terminal key ID and the credentials, then click on 'Link Device'
3) At this point, the 'Forgot Password?' button should appear, but it doesn't. When debugging with developer tools, the isOnline has the value 'false', but it should be 'true'
isOnline is retrieved this way

  const isOnline = useSelector(
    state => !!state.RemoteServer.BackendServer?.isOnline
  );

In case of the first login, isOnline is undefined because no request to the server has been registered yet, so in this case it has to be assumed that the application is online.
No tags attached.
Issue History
2025-01-13 14:19asier_perezNew Issue
2025-01-13 14:19asier_perezAssigned To => Triage Platform Conn
2025-01-13 14:19asier_perezTriggers an Emergency Pack => No
2025-01-17 10:54adrianromeroAssigned ToTriage Platform Conn => ignacio_deandres
2025-01-17 10:56adrianromeroProposed Solution updated
2025-01-17 10:57adrianromeroStatusnew => scheduled
2025-01-20 12:29hgbotNote Added: 0174391
2025-01-21 09:09hgbotResolutionopen => fixed
2025-01-21 09:09hgbotStatusscheduled => closed
2025-01-21 09:09hgbotNote Added: 0174448
2025-01-21 09:09hgbotFixed in Version => 25Q2
2025-01-21 09:09hgbotNote Added: 0174449

Notes
(0174391)
hgbot   
2025-01-20 12:29   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1725 [^]
(0174448)
hgbot   
2025-01-21 09:09   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1725 [^]
(0174449)
hgbot   
2025-01-21 09:09   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: a5a0ac8dc7ccb9560fcfe73b71477ac9bc2b973e
Author: Ignacio De Andrés <i.deandres@orisha.com>
Date: 21-01-2025 08:37:52
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/a5a0ac8dc7ccb9560fcfe73b71477ac9bc2b973e [^]

FIXES ISSUE-57626: Fixed 'Forgot password' button not being displayed when there's not information from the backend server. It will now show it anyway (as this only happens in the first login)

---
M web-jspack/org.openbravo.core2/src/components/AuthProvider/LoginForm.jsx
---