fix auth for an endpoint