patch checkAuth so that it take into account all the docs and not just the first one