Auth code refactor [#82811624]