[Users] expired OAuth2 token treated as still fresh, will not update
Dustin Miller
dustbiz at gmail.com
Tue Nov 8 06:47:47 UTC 2022
On Mon, 7 Nov 2022 14:49:42 -0600
Dan N <dhn2-linux at stanfordalumni.org> wrote:
> On Mon, 07 Nov 2022 17:50:11 +0000
> "David Fletcher" <David at megapico.co.uk> wrote:
> >
> > There is a function in the source (oauth2.c) which decides if the
> > tokens are still fresh:
> > if (expiry > (g_get_real_time () / G_USEC_PER_SEC)){
> >
> > The stored expiry time is actually generated locally on your
> > machine to avoid time zone issues. So if Google says the token has
> > a life of 3600 seconds (1 hour) that is stored using
> > g_get_real_time () / G_USEC_PER_SEC) + 3600.
>
> ... I ran gdb with my debugging version of claws-mail, put a
> breakpoint on the line before that expiry check,
>
DM: Thanks for sharing your experience, Dan. I'm dipping my toe a bit
into the world of debugging and so I found what you wrote interesting
rather than just 'over-my-head'. :) Would you mind sharing the gdb
command you used to set the breakpoint in this instance, or at least
how you determined where the breakpoint needed to be and how to
represent that in the command? I've seen other examples, but I think one
that applies specifically to Claws would be interesting / helpful for
me.
>
> and when triggered I printed the expiry value, set it to 0 and
> continued.
>
DM: Would also be interested in the one or more commands / actions you
used to accomplish this step. Thanks, ---Dustin
More information about the Users
mailing list