You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Goal: use oauth_flow_auth_code() as a single function through which I can:
Generate: Create a token
Cache: Initialize/leverage a cache using ^ token (via cache_choose() et al)
Refresh: If a given token (new or cached) is expired, use the refresh token to generate a new token (rather than oauth_flow_refresh(), as discussed at length in Rotating refresh tokens #186)
Currently, only (1) is supported by oauth_flow_auth_code() whereas (2) & (3) are automated via auth_outh_sign() but only as an indirect side effect of calling req_oauth_auth_code().
Proposal: move the auth_outh_sign() logic to the token-generation layer, instead of (or in addition to) the request layer, since, e.g., req_oauth_auth_code() calls oauth_flow_auth_code() anyway.