Skip to content

Commit 3d8e24b

Browse files
committed
Don't need redirect_uri in client/provider req
1 parent e3081a1 commit 3d8e24b

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

flask_oauthlib/client.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,6 @@ def authorize(self, callback=None, state=None, **kwargs):
523523
# state can be function for generate a random string
524524
state = state()
525525

526-
session['%s_oauthredir' % self.name] = callback
527526
url = client.prepare_request_uri(
528527
self.expand_url(self.authorize_url),
529528
redirect_uri=callback,
@@ -623,12 +622,10 @@ def handle_oauth1_response(self):
623622

624623
def handle_oauth2_response(self):
625624
"""Handles an oauth2 authorization response."""
626-
627625
client = self.make_client()
628626
remote_args = {
629627
'code': request.args.get('code'),
630628
'client_secret': self.consumer_secret,
631-
'redirect_uri': session.get('%s_oauthredir' % self.name)
632629
}
633630
log.debug('Prepare oauth2 remote args %r', remote_args)
634631
remote_args.update(self.access_token_params)
@@ -680,7 +677,6 @@ def authorized_response(self):
680677

681678
# free request token
682679
session.pop('%s_oauthtok' % self.name, None)
683-
session.pop('%s_oauthredir' % self.name, None)
684680
return data
685681

686682
def authorized_handler(self, f):

0 commit comments

Comments
 (0)