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

httpRequest method doesn't work when the token is invalid #179

Closed
brionmario opened this issue Aug 22, 2024 · 0 comments
Closed

httpRequest method doesn't work when the token is invalid #179

brionmario opened this issue Aug 22, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@brionmario
Copy link
Member

Describe the issue:

ATM, before the httpRequest is invoked, we do a validation check on the user's authentication status.

But a recent addition is added to the isAuthenticated() method to validate the access token expiry date as well.
This works for checking the authenticated status of the user but when the token is invalid, httpRequest method has the capability to refresh the token but that logic is newer reached due to await this._validateMethod(config.attachToken);

How to reproduce:

  • Let the token expire
  • Trigger an API that uses the httpRequest method.
  • Observe that the API request is not triggered and an exception is thrown.

Expected behavior:

httpRequest should continue and the token should be refreshed if invalid.

Environment information (Please complete the following information; remove any unnecessary fields) :

  • Product Version: [e.g., IS 5.10.0, IS 5.9.0]
  • OS: [e.g., Windows, Linux, Mac]
  • Browser: [e.g., Chrome, Firefox]
  • SDK Version: [e.g., 0.1.0, 0.1.1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant