How to prefix base route for all service service routes

You can dynamically modify all Services that were defined with [Route] Attributes with:

public class AppHost : AppHostBase
{
    //...
    public override RouteAttribute[] GetRouteAttributes(Type requestType)
    {
        var routes = base.GetRouteAttributes(requestType);
        routes.Each(x => x.Path = "/api" + x.Path);
        return routes;
    }
}

But the built-in Auth Services aren’t registered with Attributes, but they can be changed with something like:

Plugins.Add(new AuthFeature {
  //...
    ServiceRoutes = new Dictionary<Type, string[]> {
      {typeof(AuthenticateService), new[] { "/api/auth", "/api/auth/{provider}" }},
    }
}