-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 auth support via command #129
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this part is missing?
when the access token seems valid, but you got a 401 or 403 error from the API, and the refresh token is still valid, try refreshing the tokens
if this fails as well, delete the stored tokens
if this works, print a message for the user like "Access token successfully refreshed. Try repeating the measurement."
The access token is silently refreshed if there's a refresh token. I didn't add any message because it might broke the live view, but I can add it if you think is worth it? |
Is it actually refreshed after the measurement fails with an error? I might have missed it, but I haven't seen that logic in the code. I understand the token is refreshed correctly when it expires, but this is about a case when it stops working before the original expiration date. |
yeah, you're right, I've missed that. Thanks |
Implementation for #108