requests-oauthlib icon indicating copy to clipboard operation
requests-oauthlib copied to clipboard

authorization_url doesn't use callback_uri provided during initialisation

Open sgabello opened this issue 5 years ago • 0 comments

An example using an explicit callback URI.

>>> request_token_url = 'https://api.twitter.com/oauth/request_token'
>>> authorization_url = 'https://api.twitter.com/oauth/authorize'
>>> oauth_session = OAuth1Session('client-key', client_secret='secret', callback_uri='https://127.0.0.1/callback')
>>> oauth_session.fetch_request_token(request_token_url)
{
    'oauth_token': 'sdf0o9823sjdfsdf',
    'oauth_token_secret': '2kjshdfp92i34asdasd',
}
>>> oauth_session.authorization_url(authorization_url)

should return: https://api.twitter.com/oauth/authorize?oauth_token=sdf0o9823sjdfsdf&oauth_callback=https%3A%2F%2F127.0.0.1%2Fcallback And instead it returns: https://api.twitter.com/oauth/authorize?oauth_token=sdf0o9823sjdfsdf

sgabello avatar Feb 23 '20 20:02 sgabello