Skip to content

fix: refresh user details while refreshing token

Navin Karkera requested to merge navin/fix-username-refresh into master

Username stored in localstorage was not refreshed along with token as it was being reused. This commit clears it and fetches it again while refreshing the token.

Supporting information

Testing instructions

Step by step produce

  1. Add below part to backend/conf/settings/local.py to expire access_token after 5 seconds.
OAUTH2_PROVIDER = {
    "ACCESS_TOKEN_EXPIRE_SECONDS": 5
}
  1. Start server using make up and frontend using make run.frontend
  2. Login and open devtools network tab.
  3. Manually change username to something else
  4. Click on any item after 5 seconds, the username should be updated back to the correct one.

Author notes and concerns

Still not sure how the username could be changed without manually updating via devtools.

Edited by Navin Karkera

Merge request reports