InvenTree/src/frontend
Oliver 289af4e924
Refactor login state management (#7158)
* Refactor login state management

- Previously relied only on presence of cookie
- Cookie may not actually be *valid*
- Inspect actual login state by looking at userState values
- Ensures better sequencing of global state API requests
- Login state is now correctly preseed across browsers

* Ignore errors for user/me/ API endpoint in playwright test

* Do not request notifications unless logged in

* Prevent duplicate licenses

* Update src/frontend/src/views/DesktopAppView.tsx

Co-authored-by: Matthias Mair <code@mjmair.com>

* Simplify checkLoginState

* Fix bug in return types

* Update playwright tests

* linting

* Remove error msg

* Use token auth for API calls

- Will (hopefully) allow us to bypass csrfmiddle request handling?

* Refetch token if not available

* Use cache for DISPLAY_FULL_NAMES setting

* Update src/frontend/tests/baseFixtures.ts

Co-authored-by: Matthias Mair <code@mjmair.com>

* PUI test updates

* Tweak doLogout function

* Revert change to baseFixtures.ts

* Cleanup

* Fix highlighted property

* Test cleanup

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2024-05-07 23:11:38 +10:00
..
public Platform UI - React integration (#5011) 2023-07-18 22:45:49 +10:00
src Refactor login state management (#7158) 2024-05-07 23:11:38 +10:00
tests Refactor login state management (#7158) 2024-05-07 23:11:38 +10:00
.babelrc Platform UI - React integration (#5011) 2023-07-18 22:45:49 +10:00
.gitignore [PUI] Add coverage testing (#6881) 2024-04-03 19:26:38 +11:00
.linguirc Add ukrainian as a language option (#7129) 2024-04-29 16:37:53 +10:00
.prettierrc Platform UI - React integration (#5011) 2023-07-18 22:45:49 +10:00
eslint.config.cjs Bump eslint from 8.57.0 to 9.0.0 in /src/backend (#6979) 2024-04-19 22:11:17 +10:00
index.html P UI: Basic UI & Auth setup (#5207) 2023-07-21 08:54:57 +10:00
netlify.toml [P_UI] Added django settings for p_ui (#5343) 2023-08-10 20:57:33 +10:00
package.json Bump @lingui/macro from 4.8.0 to 4.10.0 in /src/frontend (#7033) 2024-04-16 13:33:04 +10:00
playwright.config.ts Refactor login state management (#7158) 2024-05-07 23:11:38 +10:00
tsconfig.json Platform UI - React integration (#5011) 2023-07-18 22:45:49 +10:00
tsconfig.node.json Platform UI - React integration (#5011) 2023-07-18 22:45:49 +10:00
vite.config.ts [BUG] Include .vite subdir in PUI releases (#6973) 2024-04-08 06:50:10 +10:00
yarn.lock Bump @lingui/macro from 4.8.0 to 4.10.0 in /src/frontend (#7033) 2024-04-16 13:33:04 +10:00