code: def next(self):
          
          next = request.args.get('next')
          if next is None:
              params = self.default_redirect_params
              next = url_for(self.default_redirect_endpoint, **params)
          return next
docs: Where to redirect after authorization