save_refresh_token may delete valid refresh_token and break refresh functionality #404
Open
3 tasks done
Labels
bug
enhancement
Issues & PRs related to new features.
needs analysis
Issues needing further investigation to the cause and/or change required.
Milestone
Describe the bug
save_refresh_token()
is called after the initial request. In our case of interest, the payload bring arequest_token
field (in the case of Google, this happens ifaccess_type=offline
.Such
refresh_token
may not have an expiration time.The problem is that when a refresh is requested, in
ensure_tokens_still_fresh()
,save_refresh_token()
is called again with the new response. But the new response may not provide a newrefresh_token
.Google states
save_refresh_token()
disregard the existing and still validrefresh_token
and replace it with false (since the response to a renewal does not contain it)To Reproduce
Steps to reproduce the behavior:
refresh_token
)Expected behavior
I think Google OIDC should work out of the box
Isolating the problem (mark completed items with an [x]):
WordPress Environment
The text was updated successfully, but these errors were encountered: