Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QOAuth2AuthorizationCodeFlow - who is responsible to call refreshAccessToken?



  • Hi,
    my first post .

    using QOAuth2AuthorizationCodeFlow from code examples that i found all over the net.
    using desktop application ,at startup I manually call refreshAccessToken and things are OK.

    what I do not understand is who is responsible to the next calls to refreshAccessToken.
    assuming that the app will be open for long hours...

    never worked with rest / Oauth before , what is the idiomatic way to refresh the tokens?

    shouldn't QOAuth2AuthorizationCodeFlow do it for me? (nothing in the source code showing it)
    should I setup a timer that will connected to refreshAccessToken slot?
    should i wait for failure in api call and then call refreshAccessToken?

    thanks.
    ori


Log in to reply