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

[REFACTOR]: handle network delays with expiry of access token #4463

Open
Narayanbhat166 opened this issue Apr 25, 2024 · 0 comments · May be fixed by #4617
Open

[REFACTOR]: handle network delays with expiry of access token #4463

Narayanbhat166 opened this issue Apr 25, 2024 · 0 comments · May be fixed by #4617
Assignees
Labels
C-refactor Category: Refactor

Comments

@Narayanbhat166
Copy link
Member

Narayanbhat166 commented Apr 25, 2024

It may so happen that there might be a slight delay in the network to receive the access token from connector. So when we store the access token with expiry already few seconds would have elapsed. So the key might expire few seconds before than the actual expiry at hyperswitch.

Note - This affects only to those connectors which provide relative expiry i.e expires in 300s.

In order to account for this, when storing the redis expiry key, it can be set by subtracting few seconds from the actual expiry in order to account for the network delays.

Note - This can be done in the core level for all access token in order to be safe. There might also be some network delays when using this access token to create the payment. The token might have not been expired when the request is sent, but once it reaches the processor, it might have been expired.

@Narayanbhat166 Narayanbhat166 added the C-refactor Category: Refactor label Apr 25, 2024
@Narayanbhat166 Narayanbhat166 added this to the April 2024 milestone Apr 25, 2024
@Narayanbhat166 Narayanbhat166 self-assigned this Apr 25, 2024
@bernard-eugine bernard-eugine modified the milestones: April 2024, May 2024 May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-refactor Category: Refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants