2025-03-20 - Frontend Authentication with Redux

From Izara Wiki
Revision as of 07:04, 17 April 2025 by Pack (talk | contribs)
Jump to navigation Jump to search

concept

  • use both of javascript funtion and react
  • use redux for trigger longin in user-detail
  • trigger another tab is doesn't work for now because each tab has own store login work when use just one tab now
  • if use more than one tab another tab must refresh to update login

Process

  • fist, Component will call loginStart function then check accessToken and accessToken_expire from local storage before login with AWS cognito
  • after login with AWS cognito will redirect to login component for get accessToken, accessToken_expire, refresh_token and set them in local_storage
  • after everything set before redirect to current page componet will update loginStatus by isLogin property in user_detail reducer for trigger user-detail
  • then redirect to current page

other