{"action":"opened","issue":{"url":"https://api.github.com/repos/requests/requests-oauthlib/issues/246","repository_url":"https://api.github.com/repos/requests/requests-oauthlib","labels_url":"https://api.github.com/repos/requests/requests-oauthlib/issues/246/labels{/name}","comments_url":"https://api.github.com/repos/requests/requests-oauthlib/issues/246/comments","events_url":"https://api.github.com/repos/requests/requests-oauthlib/issues/246/events","html_url":"https://github.com/requests/requests-oauthlib/issues/246","id":166180816,"number":246,"title":"Getting new tokens automagically, or \"fake refresh\"","user":{"login":"lvh","id":97816,"avatar_url":"https://avatars.githubusercontent.com/u/97816?v=3","gravatar_id":"","url":"https://api.github.com/users/lvh","html_url":"https://github.com/lvh","followers_url":"https://api.github.com/users/lvh/followers","following_url":"https://api.github.com/users/lvh/following{/other_user}","gists_url":"https://api.github.com/users/lvh/gists{/gist_id}","starred_url":"https://api.github.com/users/lvh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvh/subscriptions","organizations_url":"https://api.github.com/users/lvh/orgs","repos_url":"https://api.github.com/users/lvh/repos","events_url":"https://api.github.com/users/lvh/events{/privacy}","received_events_url":"https://api.github.com/users/lvh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-18T20:05:04Z","updated_at":"2016-07-18T20:05:04Z","closed_at":null,"body":"I have an API for a backend web application that does not provide me with refresh tokens. My understanding is that this is reasonably common; since the backend application already has the credentials anyway, the usual reason for having tokens and refresh tokens goes away.\r\n\r\nEven though there is no refresh token, the original token still expires as normal. It'd be great if the automagic refresh behavior (normally using refresh) tokens also existed for when you don't have those tokens, but do have the requisite credentials to just acquire a new token anyway.\r\n\r\nThe `fetch_token` API appears to require me to specify API-specific features when I call that API: the token endpoint, scope, and credentials. I may have missed it, but there doesn't seem to be a place to store that state as e.g. part of the session.\r\n\r\nThis may be solvable compositionally, of course. I'll probably write something to fix this myself. Would you be interested in having it upstreamed? Am I just missing the Right(TM) API?"}}
{"actor":{"display_login":"lvh"}}