Skip to content

Fix auth refresh token #4203

Martin Santangelo requested to merge fix/api-refresh-token into release/4.23.0

Ticket(s) / Related Merge Requests

#4203 (closed) and possibly #4188 (closed)

Summary of Changes

While testing the token refresh logic I found and fixed the following issues:

  • Token refresh was failing if the app was not restarted between the login and the token expiration.
  • Token refresh was failing after switching users if the app was not restarted between the switch and the token expiration
  • The chat icon was polling for matrix messages count even after logging out
  • The header of the newsfeed was continuously re-rendering (causing the chat icon to mount/unmount) all the time

Testing Considerations

In order to test this without I set up a sandbox with an auth token TTL of 2 minutes.

In the dev tools option, point the app to https://chore-test-token-expiration-clients.minds.io/

After the login, the user session will expire in two minutes and it should be refreshed correctly. So the app should not lose the session after this.

Regression Scope

Anything related to user sessions can be affected, login, token refresh, user switching

Platform Affected (web, mobile, etc)

Both

Developer Testing Completed

Tested against https://chore-test-token-expiration-clients.minds.io sandbox

Merge request reports