I'm trying now doing this check in authrep and seems to work so far:
        if isinstance(app_id, dict):
            usage = app_id
            app_id = ""