Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Token Refresh Implementation to Network Layer #84

Merged

Conversation

HamzaIsrar12
Copy link
Contributor

@HamzaIsrar12 HamzaIsrar12 commented Nov 4, 2023

It applies token authentication to the network requests before a network call is made. The expiry duration is saved and it is applied before a network request is queued.

Authentication:

  • Token authentication before a network request
  • Refresh expired token before making a network request
  • Only one token refresh call for all async network requests
  • Only one token refresh call for all sync network requests
  • No looping of network calls during network problem

@volodymyr-chekyrta
Copy link
Contributor

It's confusing that all the work here with time is done in seconds.
It seems easier and clearer to convert authResponse.expiresIn to milliseconds and work with them.

k1rill
k1rill previously approved these changes Nov 21, 2023
It applies token authentication to the network requests before a
network call is made. The expiry duration is saved and it is
applied before a network request is queued.
@volodymyr-chekyrta volodymyr-chekyrta merged commit d1bf1a6 into openedx:develop Nov 22, 2023
1 check passed
@HamzaIsrar12 HamzaIsrar12 deleted the hamza/token_refresh_mech branch January 1, 2024 07:33
@HamzaIsrar12 HamzaIsrar12 linked an issue May 6, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android] Acess Token Refresh Mechanism
3 participants