dropbox_api icon indicating copy to clipboard operation
dropbox_api copied to clipboard

on_token_refreshed never trigger

Open fabiancarlos opened this issue 1 year ago • 1 comments

I was testing using byebug on the block lambda, and try to save direct in database... but just not triggering

fabiancarlos avatar Apr 15 '24 18:04 fabiancarlos

@fabiancarlos I get the same issue. If you inspect the access_token it thinks it is not expired:

access_token = OAuth2::AccessToken.from_hash(authenticator, token_hash)
puts "Access token expired? #{access_token.expired?}"

If you inspect the token returned from dropbox, it only has a "expires_in" field and no "expires_at". It appears OAuth2::AccessToken.from_hash generates "expires_at" if it is missing (i.e. now + expires_in)

guycall avatar Jul 07 '24 09:07 guycall