As a postdoc, how to make sure I get credit for helping undergrad and grad students? 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'.

Any advice?
If you wish to be a coauthor, you should definitely ask if that will happen before you start the work.  Setting clear expectations is the best way to get people to do what you want.  In those cases where you think you cannot become a coauthor, ask the person you are helping to tell your supervisor that you helped them.   Keep a list of things you did and give it to your supervisor when you need letters of recommendation.