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

[Bug] Refresh 42 API Token seems to failed under certains circumstances #2

Open
gmarcha opened this issue May 17, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@gmarcha
Copy link
Owner

gmarcha commented May 17, 2022

42 API token seems to fail to refresh.

I used oauth go package, and it seemed to automatically refresh token if request failed on 401 unauthorized.
But it's not working, maybe oauth package needs more information to be able to refresh automatically.

If it doesn't work, I could refresh 42 API token manually, and if it still doesn't work, I'll remove 42 API token refresh and only 42 Tutor API token.

@gmarcha gmarcha self-assigned this May 17, 2022
@gmarcha gmarcha added the bug Something isn't working label May 17, 2022
@gmarcha gmarcha changed the title Refresh 42 API Token seems to failed under certains circumstances [Bug] Refresh 42 API Token seems to failed under certains circumstances May 17, 2022
@gmarcha
Copy link
Owner Author

gmarcha commented Jun 2, 2022

Currently, there is a refresh inception, myAPI pings authAPI (with accessToken stored internally):

  • if success, accessToken from authAPI is not expired, and everything works as expected, myAPI refresh accessToken from myAPI;
  • if fail, accessToken from authAPI is expired, and myAPI fail to refresh that token with authAPI.

A workaround could be to avoid refreshing myAPI token with authAPI token.
It is not really useful at this step (login already enforces user information retrieving).

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