vexana icon indicating copy to clipboard operation
vexana copied to clipboard

Add Optional Refresh Token Handling to `NetworkManager`

Open ahmtydn opened this issue 7 months ago • 1 comments

Description

This issue proposes the introduction of optional refresh token handling in the NetworkManager class.


Problem

Currently, all requests made through NetworkManager implicitly rely on refresh token handling, which can lead to unnecessary overhead for public or unauthenticated endpoints.


Proposed Solution

Add a new optional parameter disableRefreshToken to the send and sendRequest methods. This will allow developers to explicitly disable token refresh logic for individual requests.


Acceptance Criteria

  • [x] A disableRefreshToken boolean parameter is added to the send and sendRequest methods.
  • [x] If disableRefreshToken is true, token refresh logic is skipped for that request.
  • [x] If not provided, the behavior remains backward compatible (defaults to current behavior).
  • [x] Documentation is updated with usage examples.

Benefits

  • Greater control over authentication flows.
  • Improved performance by avoiding unnecessary token refresh operations for specific requests.
  • Cleaner codebase with per-request flexibility.

ahmtydn avatar May 10 '25 22:05 ahmtydn