rearchitecting PolyAuth [ci skip]