def expects_oauth(self):
        """Return whether the app expects user to authenticate via OAuth."""
        return any(
            isinstance(block, components.LoginButton) for block in self.blocks.values()
        )
Return whether the app expects user to authenticate via OAuth.
gradio/blocks.py