flask_oauthlib/client.py
def authorized_response(self, args=None):
        """Handles authorization response smartly."""
        if args is None:
            args = request.args
        if 'oauth_verifier' in args:
            data = self.handle_oauth1_response(args)
        elif 'code' in args:
            data = self.handle_oauth2_response(args)
        else:
            data = self.handle_unknown_response()

        # free request token
        session.pop('%s_oauthtok' % self.name, None)
        session.pop('%s_oauthredir' % self.name, None)
        return data
def authorized_response(self, args=None):
        """Handles authorization response smartly."""
        if args is None:
            args = request.args
        if 'oauth_verifier' in args:
            data = self.handle_oauth1_response(args)
        elif 'code' in args:
            data = self.handle_oauth2_response(args)
        else:
            data = self.handle_unknown_response()

        # free request token
        session.pop('%s_oauthtok' % self.name, None)
        session.pop('%s_oauthredir' % self.name, None)
        return data
Handles authorization response smartly.