/
Rainmaker - Localstorage

Rainmaker - Localstorage


What all we store in localstorage?

Key Description citizen keyemployee key
path


previousFloorNoused for PT floor no storage

tenant-iduser tenant id from user-serviceEmployee.tenant-idCitizen.tenant-id
expires-intimestampsCitizen.expires-inEmployee.expires-in 
refresh-tokenrefresh token from user-serviceCitizen.refresh-tokenEmployee.refresh-token
breadCrumbObjectbreadcrumb for mobile

tokenauth tokenCitizen.tokenEmployee.token
menuName
Citizen.menuNameEmployee.menuName
user-infouser info from user-serviceCitizen.user-infoEmployee.user-info
localization_en_INlocalization key values from localization service

last-login-timetimestampCitizen.last-login-timeEmployee.last-login-time
businessServiceDataworkflow dataCitizen.businessServiceDataEmployee.businessServiceData
localelanguage indexCitizen.localeEmployee.locale
menuPath
Citizen.menuPathEmployee.menuPath


  • Key & values are stored separately for citizen and employee to maintain the same session login for both apps




Uitlity functions to fetch the localstorage values are listed below, please always use the below functions to fetch and set the values.


Get methods

  1. getAccessToken()
  2. getUserInfo()
  3. getTenantId()
  4. getLocalization()
  5. getLocale()


set methods

  1. setUserInfo()
  2. setAccessToken()
  3. setRefreshToken()
  4. setTenantId()
  5. setLocale()
  6. setReturnUrl()


Please refer \egov-web-app\web\rainmaker\dev-packages\egov-ui-kit-dev\src\utils\localStorageUtils\index.js for more details.














Related content

How to add dynamic drop down for mdms data
How to add dynamic drop down for mdms data
Read with this
Localization configurations and setup.
Localization configurations and setup.
More like this
Guidelines and principles of egov Frontend
Guidelines and principles of egov Frontend
Read with this
Localization Configurations at UI
Localization Configurations at UI
More like this
Configuration definition
Configuration definition
Read with this
Language Selection
Language Selection
More like this