Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion flask_oauthlib/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def request(self, url, data=None, headers=None, format='urlencoded',
)
return OAuthResponse(resp, content, self.content_type)

def authorize(self, callback=None, state=None):
def authorize(self, callback=None, state=None, **kwargs):
"""
Returns a redirect response to the remote authorization URL with
the signed callback given.
Expand All @@ -449,6 +449,7 @@ def authorize(self, callback=None, state=None):
:param state: an optional value to embed in the OAuth request.
Use this if you want to pass around application
state (e.g. CSRF tokens).
:param kwargs: add optional key/value pairs to the query string
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

"""
if self.request_token_url:
token = self.generate_request_token(callback)[0]
Expand All @@ -459,6 +460,8 @@ def authorize(self, callback=None, state=None):
assert callback is not None, 'Callback is required OAuth2'

params = dict(self.request_token_params) or {}
params.update(**kwargs)

client = self.make_client()

if 'scope' in params:
Expand Down