-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Infinite loop in geAuth #1252
Comments
Nevermind, I was having a hard time following the code. |
I think this is a duplicate of my issue here: #1071 |
@tsightler yeah, I am not sure why the refresh token is ever cleared. If the client enters a auth failure state, the failures should continue with the last known refresh token, which may recover. But as of now it clears the refresh token and guarantees it will never recover. |
I think it's just because the same code path is used for the initial authentication so, for example, if there is a configured token, but that saved token isn't valid, it's cleared so the same code path can be used to re-authenticate via standard 2FA auth. That's actually fine for the case where the token truly is invalid (for example, user removes account from authorized devices), but it's not good for the case where the token is only temporarily not working, which is the far more common case, in my experience. |
Yeah, gonna try this and see if it works better. I don't think the rest client should be responsible for refresh token clearing. That requires user interaction, and it happens silently now. koush@4e95093 |
Is there an existing issue for this?
Describe The Bug
https://github.com/dgreif/ring/blob/main/packages/ring-client-api/rest-client.ts#L268
Doesn't this line cause a recursive request loop on a service or connection failure?
To Reproduce
No response
Expected behavior
N/A
Relevant log output
No response
Screenshots
No response
Additional context
No response
OS
All
Node.js Version
All
NPM Version
N/A
ring-client-api
11
Operating System
All
The text was updated successfully, but these errors were encountered: