Revamped auth factory