def __init__(self, app: App) -> None:
        """Create Auth class to protect flask routes and socketio connect."""
        self.app = app
        self.app.app.before_request(self.before_request)
        # only need to check credentials on "connect" event
        self.app._socketio.on('connect')(self.socketio_auth)
def __init__ ( self , app : App ) -> None : self . app = app self . app . app . before_request ( self . before_request ) self . app . _socketio . on ( 'connect' ) ( self . socketio_auth )
Create Auth class to protect flask routes and socketio connect.