Git Product home page Git Product logo

Comments (5)

koush avatar koush commented on May 29, 2024

Nevermind, I was having a hard time following the code. authConfig gets cleared. It does seem like there's an issue here where any service/connection failure clears the auth.

from ring.

tsightler avatar tsightler commented on May 29, 2024

I think this is a duplicate of my issue here: #1071

from ring.

koush avatar koush commented on May 29, 2024

@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.

from ring.

tsightler avatar tsightler commented on May 29, 2024

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.

from ring.

koush avatar koush commented on May 29, 2024

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

from ring.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.