My master’s thesis’ results will be published without my consent. What should I do? Last year I finished my master’s. I spent the whole year working on experiments for my master's thesis. Part of the results I obtained were published in my master’s thesis, which was submited via an online tool to my university; so there is proof that that work is mine, I guess.

Then I was offered to stay in that research group and do a PhD, but I refused. They went as far as to threaten me with publishing my data without crediting me. I still refused.

Now it has come to my attention that my data has been used to write a paper that will soon be sent for publishing. Besides that threat from months ago, no one has asked for my consent or permission to use my data, and I don’t even know if my name will be among the authors. Even if it does, I won’t be first author, because they will be assigning that to the person who wrote it.
(I’m not sure how much they have written themselves, as I already had written nearly everything myself for when I had to hand it in for it to be graded for my master.)

My questions are: if I am actually asked for permission before they send it to a journal for publishing and they say they will include my name but not as first author, is it worth accepting or should I refuse? In the case they don’t ask me for permission, what should I do? Mail the journal once the paper is published along with my master's thesis and the raw data (all I have are excel files) to prove the data is stolen?



I understand the confusion in some answers, as my case is very chaotic.
As far as I'm concerned, my thesis is not available to the public. Only my advisor and the director of the master have access to it (maybe more people at the university, but it's definitely not available to the public). 
I also know from a case of a person who did his master's thesis in this same research group and then left, and he was asked for permission before the paper using his data was written. He was also credited as an author. 
Sadly, the fact that the boss holds a grudge against me for not wanting to stay and her having a favorite (the one who will be credited as first author) also plays a major role in this.
In my field, being a first (or last) author means you are who worked the most in that paper. It's usually the boss/advisor and the person who obtained most of the data by working in the lab.
Part of the results I obtained were published in my master’s thesis, which was submited via an online tool to my university; so there is proof that that work is mine, I guess.


Let me first say a meta comment - once you publish a set of results, they are no longer 'yours'. They belong, in part, to the institution that funded you, to your advisor who helped you write your thesis, and to other coauthors/colleagues who helped you along the way. Research is a collaborative act. 

To your specific case, I strongly doubt that you have proprietary rights to the data. You got the results as part of a Master's thesis supported by an academic institution that has rights to the data. What's more, once you published your thesis, anything in it can be used in future publications if it is properly credited (for example, if the dataset was published as an addendum to your thesis, it's fair to use it). That's basically the essence of academic progress. 

Just like any other idea that appears in your thesis, the moment that you decided to publish it (as opposed to, say, patenting it and starting a company to commercialize it), others can cite it and potentially use parts of it in their work (doesn't even have to be the advisor, literally anyone can). 

If the data is not published, I still argue that you could possibly be in the wrong in this case as well. From a proprietary perspective, you did not work alone. Your advisor and academic institution supported you, offered you tools (free access to software to develop your tools, access to your advisor, an office, classes you took, perhaps a laptop and computing services etc.). It is unethical (and a bit selfish) on your part to ignore all of the effort put into your thesis by others, and withhold the work from being published. 

See a similar discussion here.