In this paper a robust control using a sliding mode control of the active and the reactive power generated by a doubly-fed induction generator (DFIG) is presented. It provides a robust regulation of the stator side active and reactive power by currents and it is suitable for both electric energy generation and drive applications. The mathematical model of the machine written in an appropriate d-q reference frame fixed with a stator flux in order to obtain the decoupled system of control. In this case the control of the active and reactive power flowing between the stator of the DFIG and the power network is synthesized using sliding mode controllers. A good performance tracking is guaranteed in terms of stator currents references.