I am a postdoc, and I understand that my work involves assisting undergrads and grad students with their projects. But sometimes things go beyond mere helping into more like supervising and explaining in detail some important aspects to undertake the work correctly. All I get at the end is a "thank you for your help" (which I really appreciate)! At some stage I even helped another postdoc by doing some calculations and some analysis of her work. I never have my name on any of their resulting publications.
I don't know how to approach this issue, it seems odd if I would say 'listen I won't help until you promise that I will be a co-author'.