code: def callback(self):
          
          next = request.args.get('next') or None
          endpoint = 'social.{}.handle'.format(self.provider)
          return url_for(endpoint, _external=True, next=next)
docs: Generate callback url for provider