Closed NipunaMarcus closed 1 year ago
The issue reproduced with an app created with create-react-app even without using silent auth check.
Storage mechanism - Web worker Browser - Chrome
Closing this issue based on https://github.com/LSFLK/MedicinesforLK/pull/430
Describe the issue: When trying to check whether the user had a login to the system when the website State updates infinitely till we get a response back as far as I understood.
Code sample: https://github.com/LSFLK/MedicinesforLK/blob/development/admin-portal/src/App.tsx#L26
This happens when we have selected workers as our storage option. This works fine for other two storage options (localstorage, session storage)
How to reproduce:
Expected behavior: If the user logged in update the state to have authenticated true and loading false. If the user is not logged in redirect the user to the login page.
Environment information (Please complete the following information; remove any unnecessary fields) :