v1.3 shipped in CQ 5.6.1.
You could be using either /libs/collab/commons/components/comments (deprecated in 5.6.1) or /libs/social/commons/components/comments
A stack trace, if not a log of signing in and posting a comment, would also be of help. Could it be that the Comments code caught an exception from your custom authentication code and rethrew it?
If you look at /libs/social/commons/components/comments/comments.jsp, it appears the exception would happen somewhere around here :
<%
if (!cs.isClosed() && CollabUtil.canAddNode(resourceResolver.adaptTo(Session.class), cs.getRootPath())) {
%><sling:include resourceType="social/commons/components/composer" replaceSelectors="simple-template"/><%
}
if(!CollabUtil.canAddNode(resourceResolver.adaptTo(Session.class), cs.getRootPath())) {
%><p><%=i18n.get("You are not allowed to post here, please sign in or join")%></p>
The answer to replication of "comments" (UGC) is complicated. It depends on your deployment, but prior to AEM Communities 6.1, UGC is first reverse replicated to the author instance and then forward replicated to any other publish instances. It can be tricky to keep all UGC appropriately synchronized.
As of AEM 6.1 (v1.7), there is a common store for UGC that is visible to all author and publish instances. Replication is no longer used for UGC.
If there are any plans to move forward to a more recent release, then consideration should be given to at least upgrading now to the v1.4 socialcommunities package that's built for CQ 5.6.1.
- JK