* changes: refactor(auth): clean up certificate length checks refactor(auth): remove code duplication