    def fetch_by_client_id(self, client_id):
        """Find a client by its id"""
        client = self.db.query(orm.OAuthClient).filter_by(identifier=client_id).first()
        if client and client.secret:
            return client
Find a client by its id
jupyterhub/oauth/provider.py